summaryrefslogtreecommitdiff
path: root/src/lib/auth/api/switchAccountApi.js
blob: 79ca255326061e99ed29873d168091a1fe58e983 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
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;