feat: get active workflow params

This commit is contained in:
karishmas6
2024-06-09 01:08:34 +05:30
parent 56ab7a3062
commit 505d2652b0

View File

@@ -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;
}
};