fix: request current password when deleting users (#5667)

This commit is contained in:
Ariel Leyva authored and GitHub committed 2026-01-18 08:36:25 +01:00
1 parent 59ca0c340a
commit cfa6c5864e
3 files changed
+29 -8

No files matched your search

+7 -1
View File
@@ -42,8 +42,14 @@ export async function update(
});
}
export async function remove(id: number) {
export async function remove(
id: number,
currentPassword: string | null = null
) {
await fetchURL(`/api/users/${id}`, {
method: "DELETE",
body: JSON.stringify({
...(currentPassword != null ? { current_password: currentPassword } : {}),
}),
});
}