Temporary Fix - Validate Prompt coming with aditional object
This commit is contained in:
parent
54064737e8
commit
2fe6ea23db
1 changed files with 14 additions and 4 deletions
|
|
@ -72,10 +72,20 @@ export async function postValidatePrompt(
|
||||||
template: string,
|
template: string,
|
||||||
frontend_node: APIClassType
|
frontend_node: APIClassType
|
||||||
): Promise<AxiosResponse<PromptTypeAPI>> {
|
): Promise<AxiosResponse<PromptTypeAPI>> {
|
||||||
return await api.post(`${BASE_URL_API}validate/prompt`, {
|
return new Promise((resolve, reject) => {
|
||||||
name: name,
|
api
|
||||||
template: template,
|
.post(`${BASE_URL_API}validate/prompt`, {
|
||||||
frontend_node: frontend_node,
|
name,
|
||||||
|
template,
|
||||||
|
frontend_node,
|
||||||
|
})
|
||||||
|
.then((response) => {
|
||||||
|
response.data.frontend_node = response.data.frontend_node[""];
|
||||||
|
resolve(response);
|
||||||
|
})
|
||||||
|
.catch((error) => {
|
||||||
|
reject(error);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue