From 1491a4f18b30f14c54eb10197c1056d9646b628f Mon Sep 17 00:00:00 2001 From: Marc Hyeler Date: Fri, 10 May 2024 16:10:57 +0000 Subject: [PATCH] add action logic --- src/lib/services/admin/mainApi.js | 25 +++++++++++++++++++ .../(admin)/admin/edit/Editmodal.svelte | 22 +++++++++++++--- 2 files changed, 44 insertions(+), 3 deletions(-) diff --git a/src/lib/services/admin/mainApi.js b/src/lib/services/admin/mainApi.js index 277aa55..ef631fd 100644 --- a/src/lib/services/admin/mainApi.js +++ b/src/lib/services/admin/mainApi.js @@ -115,3 +115,28 @@ export async function updateUserEditData(user, data) { throw error; } } + + +export async function postRemoveUsersLocker(user) { + try { + return await axios.post(`https://locker-api.cvapps.net/admin/edit/remove-users-locker/${user}`, + { + withCredentials: true + } + ); + } catch (error) { + throw error; + } +} + +export async function postDeleteUser(user) { + try { + return await axios.post(`https://locker-api.cvapps.net/admin/edit/delete-user/${user}`, + { + withCredentials: true + } + ); + } catch (error) { + throw error; + } +} \ No newline at end of file diff --git a/src/routes/(admin)/admin/edit/Editmodal.svelte b/src/routes/(admin)/admin/edit/Editmodal.svelte index f413082..302e77b 100644 --- a/src/routes/(admin)/admin/edit/Editmodal.svelte +++ b/src/routes/(admin)/admin/edit/Editmodal.svelte @@ -1,5 +1,5 @@