feat(useAuthenticateApp): use REST API endpoint to reset connection
This commit is contained in:
15
packages/web/src/hooks/useResetConnection.js
Normal file
15
packages/web/src/hooks/useResetConnection.js
Normal 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;
|
||||
}
|
Reference in New Issue
Block a user