skeleton logout and ...
This commit is contained in:
@@ -36,4 +36,10 @@ export const useRegister = () => {
|
||||
return useMutation({
|
||||
mutationFn: (variables: RegisterType) => api.register(variables),
|
||||
});
|
||||
};
|
||||
|
||||
export const useLogout = () => {
|
||||
return useMutation({
|
||||
mutationFn: (_) => api.logout(),
|
||||
});
|
||||
};
|
||||
@@ -43,3 +43,8 @@ export const refreshToken = async (params: RefreshTokenType) => {
|
||||
const { data } = await axios.post(`/auth/refresh`, params);
|
||||
return data;
|
||||
};
|
||||
|
||||
export const logout = async () => {
|
||||
const { data } = await axios.post(`/auth/logout`);
|
||||
return data;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user