feat: del workflow pair

This commit is contained in:
karishmas6
2024-06-09 01:08:55 +05:30
parent 505d2652b0
commit f0629418ec

View File

@@ -31,3 +31,17 @@ export const getParamsOfActiveWorkflow = async(id: string) : Promise<string[]|nu
}
};
export const deletePair = async(index: number): Promise<WorkflowFile> => {
try {
const response = await axios.delete(`http://localhost:8080/workflow/pair/${index}`);
if (response.status === 200) {
return response.data;
} else {
throw new Error('Something went wrong when fetching an updated workflow');
}
} catch (error: any) {
console.log(error);
return emptyWorkflow;
}
};