diff options
Diffstat (limited to 'makima/frontend/src/lib/api.ts')
| -rw-r--r-- | makima/frontend/src/lib/api.ts | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/makima/frontend/src/lib/api.ts b/makima/frontend/src/lib/api.ts index 552829a..9d9cb1c 100644 --- a/makima/frontend/src/lib/api.ts +++ b/makima/frontend/src/lib/api.ts @@ -3238,6 +3238,14 @@ 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`, { + method: "POST", + }); + if (!res.ok) throw new Error(`Failed to cleanup tasks: ${res.statusText}`); + return res.json(); +} + // ============================================================================= // Directive Memory Types & API // ============================================================================= |
