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:
1 parent
daa93d8093
commit
c2a0a68058
7 files changed
+5
-87
No files matched your search
@@ -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