From 4ec0b9d6c826f127cb193b2d7d55fe5ad3c229ab Mon Sep 17 00:00:00 2001 From: Marcel Date: Tue, 21 Apr 2026 12:06:34 +0200 Subject: [PATCH] fix(admin): rename users edit default action to named update SvelteKit 2 forbids mixing a `default` action with named actions; the page also exports a `delete` action. Posting the edit form therefore returned a 500 with "When using named actions, the default action cannot be used." Rename the action to `update` and point the form at `?/update`. Co-Authored-By: Claude Opus 4.7 (1M context) --- frontend/src/routes/admin/users/[id]/+page.server.ts | 2 +- frontend/src/routes/admin/users/[id]/+page.svelte | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/src/routes/admin/users/[id]/+page.server.ts b/frontend/src/routes/admin/users/[id]/+page.server.ts index 14c719b6..3d0270aa 100644 --- a/frontend/src/routes/admin/users/[id]/+page.server.ts +++ b/frontend/src/routes/admin/users/[id]/+page.server.ts @@ -25,7 +25,7 @@ export const load: PageServerLoad = async ({ params, fetch, locals }) => { }; export const actions: Actions = { - default: async ({ params, request, fetch }) => { + update: async ({ params, request, fetch }) => { const data = await request.formData(); const newPassword = data.get('newPassword') as string; diff --git a/frontend/src/routes/admin/users/[id]/+page.svelte b/frontend/src/routes/admin/users/[id]/+page.svelte index ac94b9a8..aa6ad150 100644 --- a/frontend/src/routes/admin/users/[id]/+page.svelte +++ b/frontend/src/routes/admin/users/[id]/+page.svelte @@ -84,6 +84,7 @@ $effect(() => {