login with google

This commit is contained in:
Mac mini
2026-03-31 15:52:41 +07:00
parent 23fd45bda2
commit 59f64bc6a0
4 changed files with 38 additions and 19 deletions

View File

@@ -42,12 +42,8 @@ export const apiSignIn = async (payload: any) => {
};
export const apiGetCurrentUser = async () => {
const response = await fetch(API.User.CURRENT,{
method: "GET",
headers: { "Content-Type": "application/json" },
credentials: "include",
});
return response.json();
const response = await api.get(API.User.CURRENT);
return response?.data;
};
export interface ApiResponse<T> {