generator-kodly-react-app 1.0.2 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -30,7 +30,7 @@ export const useLogin = () => {
|
|
|
30
30
|
const navigate = useNavigate();
|
|
31
31
|
return useMutation({
|
|
32
32
|
mutationFn: async (data: { email: string; password: string }) => {
|
|
33
|
-
const response = await client.post('/auth/login', data);
|
|
33
|
+
const response = await client.post('/auth/user/login', data);
|
|
34
34
|
return response.data;
|
|
35
35
|
},
|
|
36
36
|
onSuccess: (authData) => {
|
|
@@ -54,7 +54,7 @@ export const useValidateToken = () => {
|
|
|
54
54
|
setTokenInAxios(authToken);
|
|
55
55
|
return useMutation({
|
|
56
56
|
mutationFn: async () => {
|
|
57
|
-
const response = await client.
|
|
57
|
+
const response = await client.post('/auth/user/validate');
|
|
58
58
|
return response.data;
|
|
59
59
|
},
|
|
60
60
|
retry: false,
|
|
@@ -75,7 +75,7 @@ export const useLogout = () => {
|
|
|
75
75
|
const navigate = useNavigate();
|
|
76
76
|
return useMutation({
|
|
77
77
|
mutationFn: async () => {
|
|
78
|
-
await client.post('/auth/logout');
|
|
78
|
+
await client.post('/auth/user/logout');
|
|
79
79
|
},
|
|
80
80
|
onSuccess: () => {
|
|
81
81
|
setAuthToken('');
|
package/package.json
CHANGED