diff --git a/apps/blog/src/pages/admin.astro b/apps/blog/src/pages/admin.astro index 38890c3..0566fd3 100644 --- a/apps/blog/src/pages/admin.astro +++ b/apps/blog/src/pages/admin.astro @@ -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'); diff --git a/apps/blog/src/styles/global.css b/apps/blog/src/styles/global.css index 727c884..0c11307 100644 --- a/apps/blog/src/styles/global.css +++ b/apps/blog/src/styles/global.css @@ -48,46 +48,15 @@ details pre { } #guestbook-form { - display: flex; - flex-direction: column; - gap: 0.5rem; - padding-left: 1rem; margin-top: 0.5rem; } #guestbook-form input, -#guestbook-form textarea { - font-family: monospace; - font-size: 1rem; - padding: 0.25rem; - border: 1px solid #888; - background: transparent; - color: inherit; -} - -#guestbook-form textarea { - min-height: 3rem; - resize: vertical; -} - +#guestbook-form textarea, #guestbook-form button { - font-family: monospace; - font-size: 1rem; - padding: 0.25rem 0.5rem; - cursor: pointer; - background: transparent; - border: 1px solid #888; - color: inherit; - align-self: flex-start; -} - -#guestbook-form button:hover { - background: #888; - color: #000; + font: inherit; } #guestbook-status { - padding-left: 1rem; color: #888; - font-family: monospace; }