From c5feebe22f8556d86586e9e06f4134f501dcf9bb Mon Sep 17 00:00:00 2001 From: Robin Munn Date: Tue, 28 May 2024 15:11:26 +0700 Subject: [PATCH] Fix deleteProject logic --- frontend/src/routes/(authenticated)/admin/AdminProjects.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/routes/(authenticated)/admin/AdminProjects.svelte b/frontend/src/routes/(authenticated)/admin/AdminProjects.svelte index d44be5e4e..4e43952b4 100644 --- a/frontend/src/routes/(authenticated)/admin/AdminProjects.svelte +++ b/frontend/src/routes/(authenticated)/admin/AdminProjects.svelte @@ -60,7 +60,7 @@ let deleteProjectModal: ConfirmDeleteModal; async function deleteProjectOrDraft(project: ProjectItemWithDraftStatus): Promise { - const deleteFn = project.isDraft ? _deleteProject : _deleteDraftProject; + const deleteFn = project.isDraft ? _deleteDraftProject : _deleteProject; const result = await deleteProjectModal.open(project.name, async () => { const { error } = await deleteFn(project.id); return error?.message;