From f7b0832cc51bb02f6c989cf88621a975a2ecc099 Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Wed, 25 Jan 2023 14:20:43 +1300 Subject: [PATCH] Try delete projects before team in case of incorrect password --- .../organization-[organization]/deleteOrganization.svelte | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/routes/console/organization-[organization]/deleteOrganization.svelte b/src/routes/console/organization-[organization]/deleteOrganization.svelte index be3cdaf0a..eabc9dc9f 100644 --- a/src/routes/console/organization-[organization]/deleteOrganization.svelte +++ b/src/routes/console/organization-[organization]/deleteOrganization.svelte @@ -18,8 +18,6 @@ const deleteOrg = async () => { try { - await sdkForConsole.teams.delete($organization.$id); - const projectList = await sdkForConsole.projects.list([ Query.equal('teamId', $organization.$id), ]) @@ -28,6 +26,8 @@ await sdkForConsole.projects.delete(project.$id, password); })); + await sdkForConsole.teams.delete($organization.$id); + addNotification({ type: 'success', message: `${$organization.name} has been deleted`