CoolFace
Apppublic

DataScope26/WEB

sourceHugging Faceupdated 7d agoView on Hugging Face
0likes
apiCompanySetup.js25 linesDownload Raw Back to services
1import axiosClient from "./axiosClient.js";2 3export const createArea = (token, companyId, name) =>4    axiosClient.put("/area", { companyId, name }, { headers: { Authorization: token } });5 6export const getAreas = (token, companyId) =>7    axiosClient.get(`/areas?companyId=${companyId}`, { headers: { Authorization: token } });8 9export const updateArea = (token, companyId, areaId, name) =>10    axiosClient.patch(`/area/${areaId}`, { companyId, name }, { headers: { Authorization: token } });11 12export const deleteArea = (token, companyId, areaId) =>13    axiosClient.delete(`/area/${areaId}?companyId=${companyId}`, { headers: { Authorization: token } });14 15export const searchEmployees = (token, companyId, term) =>16    axiosClient.get(`/employees/search?companyId=${companyId}&term=${encodeURIComponent(term)}`, {17        headers: { Authorization: token },18    });19 20export const createInvite = (token, companyId, targetUserMail, areaId) =>21    axiosClient.put(22        "/invite",23        { companyId, targetUserMail, areaId },24        { headers: { Authorization: token } }25    );