feat: use REST API endpoint to test step

This commit is contained in:
Ali BARIN
2024-09-19 09:08:44 +00:00
parent c8dae9ea9a
commit 84d5b3b158
2 changed files with 38 additions and 43 deletions

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