Refactor unnecessary code at API
This commit is contained in:
parent
6a23dd1b8f
commit
3169e2ecf5
1 changed files with 4 additions and 13 deletions
|
|
@ -72,19 +72,10 @@ export async function postValidatePrompt(
|
||||||
template: string,
|
template: string,
|
||||||
frontend_node: APIClassType
|
frontend_node: APIClassType
|
||||||
): Promise<AxiosResponse<PromptTypeAPI>> {
|
): Promise<AxiosResponse<PromptTypeAPI>> {
|
||||||
return new Promise((resolve, reject) => {
|
return api.post(`${BASE_URL_API}validate/prompt`, {
|
||||||
api
|
name,
|
||||||
.post(`${BASE_URL_API}validate/prompt`, {
|
template,
|
||||||
name,
|
frontend_node,
|
||||||
template,
|
|
||||||
frontend_node,
|
|
||||||
})
|
|
||||||
.then((response) => {
|
|
||||||
resolve(response);
|
|
||||||
})
|
|
||||||
.catch((error) => {
|
|
||||||
reject(error);
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue