mirror of
https://github.com/juherr/kill-the-news.git
synced 2026-06-20 22:03:48 +00:00
feat: complete Phase 2 tech debt remediation
- Extract shared RSS/Atom fetch logic into feed-fetcher utility (P1-3)
- Split email-processor into validateEmail/storeEmail functions (P1-6)
- Add stateless HMAC-SHA256 CSRF protection to admin forms (P2-8)
- Fix Hono<{ Bindings: Env }> type safety across all routes (P3-13)
- Add entries.test.ts and files.test.ts with full coverage (P1-7)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
+3
-5
@@ -1,17 +1,15 @@
|
||||
import { Context } from "hono";
|
||||
import { Env } from "../types";
|
||||
|
||||
export async function handle(c: Context): Promise<Response> {
|
||||
const env = c.env as unknown as Env;
|
||||
|
||||
if (!env.ATTACHMENT_BUCKET) {
|
||||
export async function handle(c: Context<{ Bindings: Env }>): Promise<Response> {
|
||||
if (!c.env.ATTACHMENT_BUCKET) {
|
||||
return new Response("Attachment storage not configured", { status: 404 });
|
||||
}
|
||||
|
||||
const attachmentId = c.req.param("attachmentId");
|
||||
const filename = c.req.param("filename");
|
||||
|
||||
const object = await env.ATTACHMENT_BUCKET.get(attachmentId);
|
||||
const object = await c.env.ATTACHMENT_BUCKET.get(attachmentId);
|
||||
|
||||
if (!object) {
|
||||
return new Response("Not found", { status: 404 });
|
||||
|
||||
Reference in New Issue
Block a user