diff options
| author | IT Fixcomart <it@fixcomart.co.id> | 2025-08-15 10:23:38 +0000 |
|---|---|---|
| committer | IT Fixcomart <it@fixcomart.co.id> | 2025-08-15 10:23:38 +0000 |
| commit | 5ef267f76486ed590c00d3c37cccde5c713491cd (patch) | |
| tree | 4a3cf919743ac45d4ecb8d01fdf7ef51685ca16a /src/lib/auth/api | |
| parent | 4d7e2f7b6e92cbe700e5b8fcea006b3d70ed81f9 (diff) | |
| parent | b1bdfbb9f780a1a1305e02c4b9c338b98c7a4556 (diff) | |
Merged in tempo-v2 (pull request #442)
Tempo v2
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 ); |
