feat: use REST API endpoint to test step

This commit is contained in:
Ali BARIN
2024-09-24 10:23:33 +02:00
parent c8dae9ea9a
commit 84d5b3b158
2 changed files with 38 additions and 43 deletions
+14
View File
@@ -0,0 +1,14 @@
import { useMutation } from '@tanstack/react-query';
import api from 'helpers/api';
export default function useTestStep(stepId) {
const query = useMutation({
mutationFn: async () => {
const { data } = await api.post(`/v1/steps/${stepId}/test`);
return data;
},
});
return query;
}