mirror of
https://github.com/coder/coder.git
synced 2026-10-24 01:26:25 +08:00
Feat: delete template button (#3781)
* Add api call * Extract DropDownButton * Start adding DropdownButton to Template page * Move stories to dropdown button * Format * Update xservice to delete * Deletion flow * Format * Move ErrorSummary for consistency * RBAC (unfinished) and style tweak * Format * Test rbac * Format * Move ErrorSummary under PageHeader in workspace and template * Format * Replace hook with onBlur * Make style arg optional * Format
This commit is contained in:
@@ -153,6 +153,11 @@ export const updateTemplateMeta = async (
|
||||
return response.data
|
||||
}
|
||||
|
||||
export const deleteTemplate = async (templateId: string): Promise<TypesGen.Template> => {
|
||||
const response = await axios.delete<TypesGen.Template>(`/api/v2/templates/${templateId}`)
|
||||
return response.data
|
||||
}
|
||||
|
||||
export const getWorkspace = async (
|
||||
workspaceId: string,
|
||||
params?: TypesGen.WorkspaceOptions,
|
||||
|
||||
Reference in New Issue
Block a user