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,
|
||||
frontend_node: APIClassType
|
||||
): Promise<AxiosResponse<PromptTypeAPI>> {
|
||||
return new Promise((resolve, reject) => {
|
||||
api
|
||||
.post(`${BASE_URL_API}validate/prompt`, {
|
||||
name,
|
||||
template,
|
||||
frontend_node,
|
||||
})
|
||||
.then((response) => {
|
||||
resolve(response);
|
||||
})
|
||||
.catch((error) => {
|
||||
reject(error);
|
||||
});
|
||||
return api.post(`${BASE_URL_API}validate/prompt`, {
|
||||
name,
|
||||
template,
|
||||
frontend_node,
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue