From e67e55d94e66909a30f7748aaa77f97728609658 Mon Sep 17 00:00:00 2001 From: anovazzi1 Date: Thu, 22 Jun 2023 15:12:38 -0300 Subject: [PATCH] feat(API): add UpdateTemplate function to update templates via API call --- src/frontend/src/controllers/API/index.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/frontend/src/controllers/API/index.ts b/src/frontend/src/controllers/API/index.ts index 40b132261..f19dbd5d8 100644 --- a/src/frontend/src/controllers/API/index.ts +++ b/src/frontend/src/controllers/API/index.ts @@ -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> { return await axios.post(`/api/v1/build/init`, flow); } + +export async function UpdateTemplate(type:string, template:APITemplateType):Promise>{ + return await axios.post(`/api/v1/UpdateTemplate`); +} \ No newline at end of file