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 <noreply@anthropic.com>
This commit is contained in:
Julien Herr
2026-05-23 23:15:08 +02:00
parent daa93d8093
commit c2a0a68058
7 changed files with 5 additions and 87 deletions
+2 -2
View File
@@ -45,9 +45,9 @@ describe("CORS middleware", () => {
);
});
it("makes /api/stats readable from any origin", async () => {
it("makes /api/v1/stats readable from any origin", async () => {
const res = await worker.fetch(
req("/api/stats", { headers: { Origin: "https://example.com" } }),
req("/api/v1/stats", { headers: { Origin: "https://example.com" } }),
env as unknown as Env,
);
expect(res.status).toBe(200);