Implement router provisioning lifecycle and deployment UI
This commit is contained in:
+16
-1
@@ -37,4 +37,19 @@ export async function apiPost<TResponse, TBody>(
|
||||
}
|
||||
|
||||
return response.json();
|
||||
}
|
||||
}
|
||||
|
||||
export async function apiDelete(path: string): Promise<void> {
|
||||
const response = await fetch(`${API_BASE}${path}`, {
|
||||
method: "DELETE",
|
||||
headers: {
|
||||
"X-API-Key": API_KEY,
|
||||
},
|
||||
});
|
||||
|
||||
if (!response.ok) {
|
||||
const error = await response.json().catch(() => null);
|
||||
|
||||
throw new Error(error?.error || `API error ${response.status}`);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user