diff options
| author | Miqdad <ahmadmiqdad27@gmail.com> | 2025-08-16 08:16:10 +0700 |
|---|---|---|
| committer | Miqdad <ahmadmiqdad27@gmail.com> | 2025-08-16 08:16:10 +0700 |
| commit | 91b73f89b35874df3e0b88c67cf906df06965782 (patch) | |
| tree | 8a4bac4fb6e67c086a493e6683ce43f733468eba /src/lib/auth/api | |
| parent | 0fa70adbf4a9fab74337d35dcfd21722370ac93e (diff) | |
| parent | 1a68a24e9fb58ecc1ade9d1d792ea06b432e4989 (diff) | |
Merge branch 'new-release' of https://bitbucket.org/altafixco/next-indoteknik into fix-map
Diffstat (limited to 'src/lib/auth/api')
| -rw-r--r-- | src/lib/auth/api/checkParentStatusApi.js | 13 | ||||
| -rw-r--r-- | src/lib/auth/api/editPersonalProfileApi.js | 2 | ||||
| -rw-r--r-- | src/lib/auth/api/switchAccountApi.js | 2 |
3 files changed, 15 insertions, 2 deletions
diff --git a/src/lib/auth/api/checkParentStatusApi.js b/src/lib/auth/api/checkParentStatusApi.js new file mode 100644 index 00000000..aa2eb1b6 --- /dev/null +++ b/src/lib/auth/api/checkParentStatusApi.js @@ -0,0 +1,13 @@ +import odooApi from '@/core/api/odooApi'; +import { getAuth } from '@/core/utils/auth'; + +const checkParentStatusApi = async () => { + const auth = getAuth(); + const checkParentStatus = await odooApi( + 'GET', + `/api/v1/user/${auth.partnerId}/parent_status` + ); + return checkParentStatus; +}; + +export default checkParentStatusApi;
\ No newline at end of file diff --git a/src/lib/auth/api/editPersonalProfileApi.js b/src/lib/auth/api/editPersonalProfileApi.js index 39cd44c1..90bda114 100644 --- a/src/lib/auth/api/editPersonalProfileApi.js +++ b/src/lib/auth/api/editPersonalProfileApi.js @@ -3,7 +3,7 @@ import { getAuth } from '@/core/utils/auth' const editPersonalProfileApi = async ({ data }) => { const auth = getAuth() - const dataProfile = await odooApi('PUT', `/api/v1/user/${auth.id}`, data) + const dataProfile = await odooApi('POST', `/api/v1/user/${auth.id}`, data) return dataProfile } diff --git a/src/lib/auth/api/switchAccountApi.js b/src/lib/auth/api/switchAccountApi.js index 79ca2553..f62693f6 100644 --- a/src/lib/auth/api/switchAccountApi.js +++ b/src/lib/auth/api/switchAccountApi.js @@ -4,7 +4,7 @@ import { getAuth } from '@/core/utils/auth'; const switchAccountApi = async ({ data }) => { const auth = getAuth(); const switchAccount = await odooApi( - 'PUT', + 'POST', `/api/v1/user/${auth.partnerId}/switch`, data ); |
