mirror of
https://github.com/juherr/kill-the-news.git
synced 2026-06-20 22:03: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:
@@ -34,7 +34,6 @@ Single Cloudflare Worker built with Hono. Routes:
|
||||
| ------------------------------------ | ---------------------------------------------------------------------- | ------- |
|
||||
| `GET /` | Public status page (monitoring counters + link to admin) |
|
||||
| `POST /api/inbound` | Webhook from ForwardEmail; IP-allowlisted to their MX sources |
|
||||
| `GET /api/stats` | Deprecated alias of `GET /api/v1/stats` (public monitoring counters) |
|
||||
| `/api/v1/feeds*` | Versioned REST API (Bearer/proxy auth) — feeds + emails CRUD |
|
||||
| `GET /api/v1/stats` | Public monitoring counters (JSON, CORS); canonical stats endpoint |
|
||||
| `GET /api/openapi.json` | OpenAPI 3.1 spec (public) |
|
||||
@@ -65,7 +64,6 @@ src/
|
||||
files.ts # R2 attachment serving
|
||||
hub.ts # WebSub hub
|
||||
home.tsx # Public status page (GET /)
|
||||
stats.ts # Monitoring counters API (GET /api/stats)
|
||||
admin.tsx # Admin UI entrypoint (hono/jsx)
|
||||
admin/ # Admin sub-modules
|
||||
feeds.tsx # Feeds CRUD UI
|
||||
|
||||
Reference in New Issue
Block a user