summaryrefslogtreecommitdiff
path: root/src/lib/auth/api/switchAccountApi.js
blob: f62693f671934b402389cb0bfb757ca9b3e237fe (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(
    'POST',
    `/api/v1/user/${auth.partnerId}/switch`,
    data
  );
  return switchAccount;
};

export default switchAccountApi;