Template Duplication

This commit is contained in:
Julian Krauser 2024-12-24 10:24:35 +01:00
parent b3125a26da
commit faa691b834
2 changed files with 45 additions and 4 deletions

View file

@ -48,6 +48,13 @@ export const useTemplateStore = defineStore("template", {
this.fetchTemplates();
return result;
},
async cloneTemplate(cloneId: number): Promise<AxiosResponse<any, any>> {
const result = await http.post(`/admin/template/clone`, {
cloneId: cloneId,
});
this.fetchTemplates();
return result;
},
async deleteTemplate(template: number): Promise<AxiosResponse<any, any>> {
const result = await http.delete(`/admin/template/${template}`);
this.fetchTemplates();