Add optional nodeId parameter to getVerticesOrder function
This commit is contained in:
parent
fa71826663
commit
fdc799ee29
1 changed files with 9 additions and 2 deletions
|
|
@ -855,9 +855,16 @@ export async function requestLogout() {
|
|||
}
|
||||
|
||||
export async function getVerticesOrder(
|
||||
flowId: string
|
||||
flowId: string,
|
||||
nodeId?: string | null
|
||||
): Promise<AxiosResponse<VerticesOrderTypeAPI>> {
|
||||
return await api.get(`${BASE_URL_API}build/${flowId}/vertices`);
|
||||
// nodeId is optional and is a query parameter
|
||||
// if nodeId is not provided, the API will return all vertices
|
||||
const config = {};
|
||||
if (nodeId) {
|
||||
config["params"] = { component_id: nodeId };
|
||||
}
|
||||
return await api.get(`${BASE_URL_API}build/${flowId}/vertices`, config);
|
||||
}
|
||||
|
||||
export async function postBuildVertex(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue