diff options
Diffstat (limited to 'makima/frontend/src/lib')
| -rw-r--r-- | makima/frontend/src/lib/api.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/makima/frontend/src/lib/api.ts b/makima/frontend/src/lib/api.ts index ed628f7..43eaa05 100644 --- a/makima/frontend/src/lib/api.ts +++ b/makima/frontend/src/lib/api.ts @@ -3248,11 +3248,11 @@ export async function updateDirectiveGoal(id: string, goal: string): Promise<Dir return res.json(); } -export async function cleanupDirectiveTasks(id: string): Promise<{ deleted: number }> { - const res = await authFetch(`${API_BASE}/api/v1/directives/${id}/cleanup-tasks`, { +export async function cleanupDirective(id: string): Promise<{ message: string; taskId: string | null }> { + const res = await authFetch(`${API_BASE}/api/v1/directives/${id}/cleanup`, { method: "POST", }); - if (!res.ok) throw new Error(`Failed to cleanup tasks: ${res.statusText}`); + if (!res.ok) throw new Error(`Failed to cleanup directive: ${res.statusText}`); return res.json(); } |
