diff options
| author | it-fixcomart <it@fixcomart.co.id> | 2024-09-20 16:52:16 +0700 |
|---|---|---|
| committer | it-fixcomart <it@fixcomart.co.id> | 2024-09-20 16:52:16 +0700 |
| commit | a784f4623448ff846dbc5c8259405e6cce8fffb7 (patch) | |
| tree | 016da331ea5a18ef2c3c1264728b1199b5e9172a /src-migrate/libs | |
| parent | 1db54e16f970b4e09df89d432efd5a66ac775eb6 (diff) | |
| parent | b7e7696d675d0c2e36364f7cbedb0483a343048d (diff) | |
Merge branch 'release' into Feature/new-register
Diffstat (limited to 'src-migrate/libs')
| -rw-r--r-- | src-migrate/libs/auth.ts | 5 | ||||
| -rw-r--r-- | src-migrate/libs/odooApi.ts | 2 |
2 files changed, 5 insertions, 2 deletions
diff --git a/src-migrate/libs/auth.ts b/src-migrate/libs/auth.ts index 86ce26e1..e8516747 100644 --- a/src-migrate/libs/auth.ts +++ b/src-migrate/libs/auth.ts @@ -1,5 +1,8 @@ import { deleteCookie, getCookie, setCookie } from 'cookies-next'; import { AuthProps } from '~/types/auth'; +// @ts-ignore +import camelcaseObjectDeep from 'camelcase-object-deep'; + const COOKIE_KEY = 'auth'; @@ -14,7 +17,7 @@ export const getAuth = (): AuthProps | boolean => { }; export const setAuth = (user: AuthProps): boolean => { - setCookie(COOKIE_KEY, JSON.stringify(user)); + setCookie(COOKIE_KEY, JSON.stringify(camelcaseObjectDeep(user))); return true; }; diff --git a/src-migrate/libs/odooApi.ts b/src-migrate/libs/odooApi.ts index 9482542b..cf839fd9 100644 --- a/src-migrate/libs/odooApi.ts +++ b/src-migrate/libs/odooApi.ts @@ -73,7 +73,7 @@ const odooApi = async ( return authResponse.result || null; } catch (error) { - console.log(error); + // console.log(error); return null; } }; |
