fix password being set to new email when trying to update oneself's email

This commit is contained in:
maxDorninger
2025-07-29 15:22:23 +02:00
parent 73e2ecefeb
commit a83a7d8c08

View File

@@ -21,7 +21,7 @@
credentials: 'include',
body: JSON.stringify({
...(newPassword !== '' && { password: newPassword }),
...(newEmail !== '' && { password: newEmail })
...(newEmail !== '' && { email: newEmail })
})
});
@@ -80,6 +80,13 @@
placeholder="Keep empty to not change the password"
type="password"
/>
<Input
bind:value={newPassword}
class="w-full"
id="password"
placeholder="Confirm new password"
type="password"
/>
</div>
</div>
<div class="mt-8 flex justify-end gap-2">