From 1b72449496ce3a057a43d002c8042d5e7a1d6576 Mon Sep 17 00:00:00 2001 From: soryu Date: Sat, 7 Feb 2026 16:36:19 +0000 Subject: Add directive init mechanism --- makima/frontend/src/lib/api.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'makima/frontend/src/lib') diff --git a/makima/frontend/src/lib/api.ts b/makima/frontend/src/lib/api.ts index 6c450eb..2187c34 100644 --- a/makima/frontend/src/lib/api.ts +++ b/makima/frontend/src/lib/api.ts @@ -3161,3 +3161,15 @@ export async function deleteDirective(id: string): Promise { } } +export async function startDirective(id: string): Promise { + const res = await authFetch(`${API_BASE}/api/v1/directives/${id}/start`, { + method: "POST", + }); + if (!res.ok) { + const body = await res.json().catch(() => null); + const msg = body?.message || res.statusText; + throw new Error(`Failed to start directive: ${msg}`); + } + return res.json(); +} + -- cgit v1.2.3