Commit e4adc3e
committed
fix(prefs): rename default action -> savePrefs (SvelteKit named-action rule)
Vercel was returning 500 on every POST to /settings/notifications:
Error: When using named actions, the default action cannot be used.
PR #70 added a `resendVerification` named action while keeping the
existing `default` action for the Save Changes form. SvelteKit
forbids that combination — once any named action exists on a page,
ALL forms must target a named action explicitly. The error was
swallowed by use:enhance so the user just saw "nothing happens" on
click; production logs surfaced it.
Renames `default` -> `savePrefs` and points the Save Changes form at
`?/savePrefs`. resendVerification is unchanged. Comment on the new
action calls out the constraint so a future reviewer doesn't
re-introduce a default.1 parent 3be3764 commit e4adc3e
2 files changed
Lines changed: 7 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
38 | 43 | | |
39 | 44 | | |
40 | 45 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
144 | 144 | | |
145 | 145 | | |
146 | 146 | | |
147 | | - | |
| 147 | + | |
148 | 148 | | |
149 | 149 | | |
150 | 150 | | |
| |||
0 commit comments