mirror of
https://github.com/juherr/kill-the-news.git
synced 2026-06-20 22:03:48 +00:00
feat(api): add versioned REST API with OpenAPI 3.1 spec
Expose /api/v1/* for feed and email management (feeds CRUD, email list/get/delete, stats) so the service can be automated without scraping the admin UI. Built on @hono/zod-openapi; the OpenAPI 3.1 spec is served at /api/openapi.json with a Scalar reference at /api/docs. Auth is token-based (Authorization: Bearer <ADMIN_PASSWORD>) plus the existing reverse-proxy headers — no cookie, no CSRF. Extracted the auth primitives into src/lib/auth.ts and the feed create/update/delete orchestration into src/lib/feed-service.ts so the admin UI and the REST API share a single source of truth. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -51,7 +51,9 @@
|
||||
"wrangler": "4.94.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@hono/zod-openapi": "^1.4.0",
|
||||
"@hono/zod-validator": "^0.8.0",
|
||||
"@scalar/hono-api-reference": "^0.10.19",
|
||||
"escape-html": "^1.0.3",
|
||||
"feed": "5.2.1",
|
||||
"hono": "4.12.22",
|
||||
|
||||
Reference in New Issue
Block a user