diff options
Diffstat (limited to 'src/lib/auth/api/switchAccountApi.js')
| -rw-r--r-- | src/lib/auth/api/switchAccountApi.js | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/lib/auth/api/switchAccountApi.js b/src/lib/auth/api/switchAccountApi.js new file mode 100644 index 00000000..79ca2553 --- /dev/null +++ b/src/lib/auth/api/switchAccountApi.js @@ -0,0 +1,14 @@ +import odooApi from '@/core/api/odooApi'; +import { getAuth } from '@/core/utils/auth'; + +const switchAccountApi = async ({ data }) => { + const auth = getAuth(); + const switchAccount = await odooApi( + 'PUT', + `/api/v1/user/${auth.partnerId}/switch`, + data + ); + return switchAccount; +}; + +export default switchAccountApi; |
