From 752e55686dfee0d536f9e4e128336e91681ba794 Mon Sep 17 00:00:00 2001 From: it-fixcomart Date: Wed, 11 Sep 2024 17:07:49 +0700 Subject: update switch account --- src/lib/auth/api/switchAccountProgresApi.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 src/lib/auth/api/switchAccountProgresApi.js (limited to 'src/lib/auth/api/switchAccountProgresApi.js') diff --git a/src/lib/auth/api/switchAccountProgresApi.js b/src/lib/auth/api/switchAccountProgresApi.js new file mode 100644 index 00000000..4005ce3c --- /dev/null +++ b/src/lib/auth/api/switchAccountProgresApi.js @@ -0,0 +1,15 @@ +import odooApi from '@/core/api/odooApi'; +import { getAuth } from '@/core/utils/auth'; + +const switchAccountProgresApi = async () => { + const auth = getAuth(); + console.log('auth', auth); + const switchAccount = await odooApi( + 'PUT', + `/api/v1/user/${auth.partner_id}/switch_progres` + ); + console.log('switchAccount', switchAccount); + return switchAccount; +}; + +export default switchAccountProgresApi; -- cgit v1.2.3 From ab0782b5cf7b65930b0b40528b9205f3f0dfc3a0 Mon Sep 17 00:00:00 2001 From: it-fixcomart Date: Thu, 12 Sep 2024 10:11:02 +0700 Subject: update switch account --- src/lib/auth/api/switchAccountProgresApi.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/lib/auth/api/switchAccountProgresApi.js') diff --git a/src/lib/auth/api/switchAccountProgresApi.js b/src/lib/auth/api/switchAccountProgresApi.js index 4005ce3c..23e06742 100644 --- a/src/lib/auth/api/switchAccountProgresApi.js +++ b/src/lib/auth/api/switchAccountProgresApi.js @@ -5,7 +5,7 @@ const switchAccountProgresApi = async () => { const auth = getAuth(); console.log('auth', auth); const switchAccount = await odooApi( - 'PUT', + 'GET', `/api/v1/user/${auth.partner_id}/switch_progres` ); console.log('switchAccount', switchAccount); -- cgit v1.2.3 From f0f002ff77481db91d264069d09f580d58001a8c Mon Sep 17 00:00:00 2001 From: it-fixcomart Date: Mon, 23 Sep 2024 13:15:02 +0700 Subject: update switch account --- src/lib/auth/api/switchAccountProgresApi.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/lib/auth/api/switchAccountProgresApi.js') diff --git a/src/lib/auth/api/switchAccountProgresApi.js b/src/lib/auth/api/switchAccountProgresApi.js index 23e06742..ba1c35fa 100644 --- a/src/lib/auth/api/switchAccountProgresApi.js +++ b/src/lib/auth/api/switchAccountProgresApi.js @@ -6,7 +6,7 @@ const switchAccountProgresApi = async () => { console.log('auth', auth); const switchAccount = await odooApi( 'GET', - `/api/v1/user/${auth.partner_id}/switch_progres` + `/api/v1/user/${auth.partnerId}/switch_progres` ); console.log('switchAccount', switchAccount); return switchAccount; -- cgit v1.2.3 From f404f9801db1f234ae03ec9c9542ba5d4aa1bf46 Mon Sep 17 00:00:00 2001 From: it-fixcomart Date: Mon, 23 Sep 2024 14:17:52 +0700 Subject: delete console.log --- src/lib/auth/api/switchAccountProgresApi.js | 2 -- 1 file changed, 2 deletions(-) (limited to 'src/lib/auth/api/switchAccountProgresApi.js') diff --git a/src/lib/auth/api/switchAccountProgresApi.js b/src/lib/auth/api/switchAccountProgresApi.js index ba1c35fa..6289a5dd 100644 --- a/src/lib/auth/api/switchAccountProgresApi.js +++ b/src/lib/auth/api/switchAccountProgresApi.js @@ -3,12 +3,10 @@ import { getAuth } from '@/core/utils/auth'; const switchAccountProgresApi = async () => { const auth = getAuth(); - console.log('auth', auth); const switchAccount = await odooApi( 'GET', `/api/v1/user/${auth.partnerId}/switch_progres` ); - console.log('switchAccount', switchAccount); return switchAccount; }; -- cgit v1.2.3