Fix: Sending file without text dont send the file
This commit is contained in:
parent
bca88b2d1b
commit
cb742e34e3
1 changed files with 4 additions and 3 deletions
|
|
@ -963,15 +963,16 @@ export async function postBuildVertex(
|
||||||
flowId: string,
|
flowId: string,
|
||||||
vertexId: string,
|
vertexId: string,
|
||||||
input_value: string,
|
input_value: string,
|
||||||
files?: string[]
|
files?: string[],
|
||||||
): Promise<AxiosResponse<VertexBuildTypeAPI>> {
|
): Promise<AxiosResponse<VertexBuildTypeAPI>> {
|
||||||
// input_value is optional and is a query parameter
|
// input_value is optional and is a query parameter
|
||||||
const data = input_value ? { inputs: { input_value: input_value } } : undefined
|
const data = { inputs: { input_value: input_value ?? "" } };
|
||||||
if (data && files) {
|
if (data && files) {
|
||||||
data["files"] = files;
|
data["files"] = files;
|
||||||
}
|
}
|
||||||
return await api.post(
|
return await api.post(
|
||||||
`${BASE_URL_API}build/${flowId}/vertices/${vertexId}`, data
|
`${BASE_URL_API}build/${flowId}/vertices/${vertexId}`,
|
||||||
|
data,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue