feat: get active workflow params
This commit is contained in:
@@ -17,3 +17,17 @@ export const getActiveWorkflow = async(id: string) : Promise<WorkflowFile> => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export const getParamsOfActiveWorkflow = async(id: string) : Promise<string[]|null> => {
|
||||||
|
try {
|
||||||
|
const response = await axios.get(`http://localhost:8080/workflow/params/${id}`)
|
||||||
|
if (response.status === 200) {
|
||||||
|
return response.data;
|
||||||
|
} else {
|
||||||
|
throw new Error('Something went wrong when fetching the parameters of the recorded workflow');
|
||||||
|
}
|
||||||
|
} catch(error: any) {
|
||||||
|
console.log(error);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user