feat(useAuthenticateApp): use REST API endpoint to reset connection

This commit is contained in:
Ali BARIN
2024-09-24 11:40:35 +00:00
parent bc0e18d074
commit 5e6f4bfb88
4 changed files with 34 additions and 59 deletions

View File

@@ -0,0 +1,15 @@
import { useMutation } from '@tanstack/react-query';
import api from 'helpers/api';
export default function useResetConnection() {
const query = useMutation({
mutationFn: async (connectionId) => {
const { data } = await api.post(`/v1/connections/${connectionId}/reset`);
return data;
},
});
return query;
}