chore: modernize setup, dependencies, and project docs

This commit is contained in:
Young Lee
2026-02-05 22:34:13 -08:00
parent 6e546d31a0
commit daf54a0fc0
10 changed files with 476 additions and 420 deletions
+3 -2
View File
@@ -1,4 +1,5 @@
import { Context, Hono } from 'hono';
import { getCookie } from 'hono/cookie';
import { html, raw } from 'hono/html';
import { z } from 'zod';
import { Env, FeedConfig, FeedList, FeedMetadata, EmailMetadata, EmailData, FeedListItem } from '../types';
@@ -28,7 +29,7 @@ async function authMiddleware(c: Context, next: () => Promise<void>) {
return next();
}
const authCookie = c.req.cookie('admin_auth');
const authCookie = getCookie(c, 'admin_auth');
if (!authCookie || authCookie !== 'true') {
return c.redirect('/admin/login');
}
@@ -1047,4 +1048,4 @@ app.post('/api/feeds/:feedId/update', async (c) => {
});
// Export the Hono app
export const handle = app;
export const handle = app;