diff --git a/frontend/src/routes/admin/+page.svelte b/frontend/src/routes/admin/+page.svelte new file mode 100644 index 0000000..6996c2f --- /dev/null +++ b/frontend/src/routes/admin/+page.svelte @@ -0,0 +1 @@ + diff --git a/frontend/src/routes/admin/+page.ts b/frontend/src/routes/admin/+page.ts new file mode 100644 index 0000000..7323d50 --- /dev/null +++ b/frontend/src/routes/admin/+page.ts @@ -0,0 +1,9 @@ +import { redirect } from '@sveltejs/kit'; +import type { PageLoad } from './$types'; + +// There's no page at exactly /admin — only /admin/login and /admin/settings — so a +// bare visit here would otherwise 404. Settings itself already redirects to login on +// a 401, so sending everyone through there is the one sensible default landing spot. +export const load: PageLoad = async () => { + throw redirect(302, '/admin/settings'); +};