web-humas-fe/services/master-user-level.ts

30 lines
717 B
TypeScript

import {
httpDeleteInterceptor,
httpGet,
httpPost,
httpPut,
} from "./http-config/axios-base-service";
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",
};
return await httpGet(`/user-levels?levelNumber=2&parentLevelId=79`, headers);
}
export async function editUserLevel(data: any, id: number) {
const headers = {
"content-type": "application/json",
};
const pathUrl = `/user-levels/${id}`;
return await httpPut(pathUrl, headers, data);
}