1
0
forked from wrenn/wrenn

Add admin template deletion with broadcast to all hosts

- DELETE /v1/admin/templates/{name} endpoint (admin-only)
- Broadcasts DeleteSnapshot RPC to all online hosts before removing DB record
- Frontend admin templates page uses deleteAdminTemplate() instead of
  team-scoped deleteSnapshot()
- Delete button shown for all template types, not just snapshots
This commit is contained in:
2026-03-26 23:53:08 +06:00
parent c0d6381bbe
commit 5cb37bf2a0
4 changed files with 61 additions and 15 deletions

View File

@ -64,3 +64,7 @@ export type AdminTemplate = {
export async function listAdminTemplates(): Promise<ApiResult<AdminTemplate[]>> {
return apiFetch('GET', '/api/v1/admin/templates');
}
export async function deleteAdminTemplate(name: string): Promise<ApiResult<void>> {
return apiFetch('DELETE', `/api/v1/admin/templates/${name}`);
}