From bf5a1ad5b5955d65a5fa096def89b93a78b0b5d1 Mon Sep 17 00:00:00 2001 From: Daniel Kirby Date: Sat, 6 Jun 2026 14:13:51 +0100 Subject: [PATCH] fix: target named login action Point the login form at the explicit named action used by the server route. Remove the stale production preview command from the README deployment notes. --- README.md | 5 ----- src/lib/components/login-form.svelte | 2 +- src/routes/login/+page.server.ts | 2 +- 3 files changed, 2 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 1b4aaa8..21441a0 100644 --- a/README.md +++ b/README.md @@ -142,10 +142,5 @@ pnpm build pnpm wrangler deploy ``` -Preview the built Worker locally: - -```sh -pnpm preview -``` Create the first production admin by opening `/login` after migrations have run. The setup form is only shown while the Better Auth `user` table is empty. diff --git a/src/lib/components/login-form.svelte b/src/lib/components/login-form.svelte index 3eb89d4..9106410 100644 --- a/src/lib/components/login-form.svelte +++ b/src/lib/components/login-form.svelte @@ -55,7 +55,7 @@
-
+
diff --git a/src/routes/login/+page.server.ts b/src/routes/login/+page.server.ts index a180357..5be6c00 100644 --- a/src/routes/login/+page.server.ts +++ b/src/routes/login/+page.server.ts @@ -95,7 +95,7 @@ export const actions: Actions = { redirect(303, getSafeRedirect(event.url)); }, - default: async (event) => { + login: async (event) => { const form = await superValidate(event, zod4(loginSchema), { id: 'login' }); if (!form.valid) {