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) <noreply@anthropic.com>
This commit is contained in:
Marcel
2026-04-21 12:06:34 +02:00
parent 1fd2fab9a1
commit 4ec0b9d6c8
2 changed files with 2 additions and 1 deletions

View File

@@ -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;

View File

@@ -84,6 +84,7 @@ $effect(() => {
<form
id="edit-user-form"
method="POST"
action="?/update"
use:enhance
oninput={unsaved.markDirty}
class="space-y-5"