diff --git a/src/app/[locale]/profile/personal/page.tsx b/src/app/[locale]/profile/personal/page.tsx index 1f460af..c7f68d8 100644 --- a/src/app/[locale]/profile/personal/page.tsx +++ b/src/app/[locale]/profile/personal/page.tsx @@ -1,5 +1,3 @@ -"use server"; - import ProfileAvatar from "@/features/ProfileAvatar/ProfileAvatar"; import { apiInstance } from "@/shared/config/apiConfig"; import { authConfig } from "@/shared/config/authConfig"; diff --git a/src/shared/config/authConfig.ts b/src/shared/config/authConfig.ts index 7fa6791..97cc7d5 100644 --- a/src/shared/config/authConfig.ts +++ b/src/shared/config/authConfig.ts @@ -51,19 +51,19 @@ export const authConfig: AuthOptions = { }; const res = await apiInstance.post("/auth/login/", data); - + console.log(res); if ([200, 201].includes(res.status)) { - const currentTime = new Date(); - const expirationTime = new Date(currentTime.getTime() + 14 * 60000); - expirationTime.setTime( - expirationTime.getTime() + - expirationTime.getTimezoneOffset() * 60 * 1000 * -1 - ); + // const currentTime = new Date(); + // const expirationTime = new Date(currentTime.getTime() + 14 * 60000); + // expirationTime.setTime( + // expirationTime.getTime() + + // expirationTime.getTimezoneOffset() * 60 * 1000 * -1 + // ); const user = { refresh_token: res.data.refresh_token, access_token: res.data.access_token, - expires_in: expirationTime, + expires_in: res.data.expires_in, }; return user;