feat(API): add UpdateTemplate function to update templates via API call

This commit is contained in:
anovazzi1 2023-06-22 15:12:38 -03:00
commit e67e55d94e

View file

@ -3,6 +3,8 @@ import {
PromptTypeAPI,
errorsTypeAPI,
InitTypeAPI,
TemplateVariableType,
APITemplateType,
} from "./../../types/api/index";
import { APIObjectType, sendAllProps } from "../../types/api/index";
import axios, { AxiosResponse } from "axios";
@ -319,3 +321,7 @@ export async function postBuildInit(
): Promise<AxiosResponse<InitTypeAPI>> {
return await axios.post(`/api/v1/build/init`, flow);
}
export async function UpdateTemplate(type:string, template:APITemplateType):Promise<AxiosResponse<APITemplateType>>{
return await axios.post(`/api/v1/UpdateTemplate`);
}