feat(api): standardize REST contracts and auth

This commit is contained in:
2026-07-30 20:38:51 +08:00
parent ae1a657554
commit ba947b616b
86 changed files with 54193 additions and 990 deletions
+2 -2
View File
@@ -59,7 +59,7 @@ def test_meta_project_returns_map_extent(monkeypatch):
app.dependency_overrides[module.get_metadata_repository] = lambda: repo
client = TestClient(app)
response = client.get("/api/v1/meta/project")
response = client.get("/api/v1/projects/current/metadata")
assert response.status_code == 200
assert response.json()["map_extent"] == {"xmin": 1, "ymin": 2, "xmax": 3, "ymax": 4}
@@ -81,7 +81,7 @@ def test_meta_db_health_returns_503_for_postgres_errors(monkeypatch):
app.dependency_overrides[module.get_project_timescale_connection] = lambda: DummyTimescaleConnection()
client = TestClient(app)
response = client.get("/api/v1/meta/db/health")
response = client.get("/api/v1/projects/current/database-health")
assert response.status_code == 503
assert response.json()["detail"] == "Project PostgreSQL health check failed: pg unavailable"