mirror of
https://github.com/juherr/kill-the-news.git
synced 2026-06-21 06:13:48 +00:00
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:
+2
-2
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user