diff --git a/frontend/src/api/users.ts b/frontend/src/api/users.ts index 56e1d0f3..0876a1ef 100644 --- a/frontend/src/api/users.ts +++ b/frontend/src/api/users.ts @@ -42,8 +42,15 @@ 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({ + what: "user", + ...(currentPassword != null ? { current_password: currentPassword } : {}), + }), }); } diff --git a/frontend/src/views/settings/Profile.vue b/frontend/src/views/settings/Profile.vue index 328b2f1a..6028acd6 100644 --- a/frontend/src/views/settings/Profile.vue +++ b/frontend/src/views/settings/Profile.vue @@ -96,11 +96,12 @@