fix: simplify form styles and handle missing auth config

- Remove excessive form styling, keep minimal
- Wrap getSession in try-catch for dev without env vars
This commit is contained in:
Lewis Wynne 2026-01-23 04:17:25 +00:00
parent 892afc2161
commit 3600897f4b
2 changed files with 8 additions and 34 deletions

View file

@ -6,7 +6,12 @@ import { getPendingEntries, type GuestbookEntry } from '../lib/db';
import { isAdmin } from '../lib/auth';
import '../styles/global.css';
const session = await getSession(Astro.request);
let session;
try {
session = await getSession(Astro.request);
} catch {
return new Response('Auth not configured', { status: 500 });
}
if (!session) {
return Astro.redirect('/api/auth/signin');