auto select and edit

This commit is contained in:
hamid zarghami
2025-07-15 12:40:39 +03:30
parent 66b1dc15d8
commit 558d03533b
38 changed files with 5269 additions and 296 deletions
@@ -0,0 +1,17 @@
import axios from "@/config/axios";
import { TemplateType, TemplatesResponseType } from "../types/Types";
export const saveTemplate = async (params: TemplateType) => {
const { data } = await axios.post("/templates", params);
return data;
};
export const getTemplates = async (): Promise<TemplatesResponseType> => {
const { data } = await axios.get("/templates");
return data;
};
export const setSelectedTemplate = async (id: string) => {
const { data } = await axios.patch(`/templates/${id}/set-selected`);
return data;
};