import Cookies from "js-cookie"; import { httpDeleteInterceptor, httpGet, httpPost, httpPut, } from "./http-config/axios-base-service"; const token = Cookies.get("access_token"); export async function createUserLevel(data: any) { const headers = { "content-type": "application/json", }; const pathUrl = `/user-levels`; return await httpPost(pathUrl, headers, data); } export async function getUserLevel() { const headers = { "content-type": "application/json", Authorization: `Bearer ${token}`, }; return await httpGet(`/user-levels?levelNumber=2&parentLevelId=79`, headers); } export async function editUserLevel(data: any, id: number) { const headers = { "content-type": "application/json", Authorization: `Bearer ${token}`, }; const pathUrl = `/user-levels/${id}`; return await httpPut(pathUrl, headers, data); }