refactor(api): remove the deprecated /api/stats endpoint

The only consumer (the marketing landing) now uses /api/v1/stats, so drop
the legacy /api/stats route and its handler. Delete src/routes/stats.ts and
its test; repoint the index CORS test at /api/v1/stats.

Co-Authored-By: Claude Opus 4.7 <[email protected]>
This commit is contained in:
Julien HerrandClaude Opus 4.7 committed 2026-05-23 23:15:08 +02:00
1 parent daa93d8093
commit c2a0a68058
7 files changed
+5 -87

No files matched your search

+1 -3
View File
@@ -57,13 +57,11 @@ Main routes:
- `src/routes/api/`: versioned REST API + OpenAPI spec/docs (`/api/v1/*`, `/api/openapi.json`, `/api/docs`)
- `src/lib/feed-service.ts`: shared feed create/update/delete (used by the admin UI and the REST API)
- `src/routes/home.tsx`: public status page (`GET /`)
- `src/routes/stats.ts`: monitoring counters API (`GET /api/stats`)
### Monitoring
`GET /api/v1/stats` returns JSON counters (public, no auth, CORS-enabled) for
uptime/monitoring tools and the landing page. `GET /api/stats` is a deprecated alias kept
for backward compatibility — prefer the versioned path. Both expose the same fields:
uptime/monitoring tools and the landing page:
| Field | Meaning |
| ----------------------------- | -------------------------------------------------------- |