41 lines
1.0 KiB
TypeScript
41 lines
1.0 KiB
TypeScript
import {
|
|
httpDeleteInterceptor,
|
|
httpGet,
|
|
httpPost,
|
|
httpPut,
|
|
} from "@/service/http-config/axios-base-service";
|
|
|
|
export async function getAllUserLevels(data: any) {
|
|
const headers = {
|
|
"content-type": "application/json",
|
|
};
|
|
return await httpGet(`user-levels?limit=${data.limit || ""}`, headers);
|
|
}
|
|
export async function getUserLevels(id: string) {
|
|
const headers = {
|
|
"content-type": "application/json",
|
|
};
|
|
return await httpGet(`user-levels/${id}`, headers);
|
|
}
|
|
|
|
export async function getAccountById(id: string) {
|
|
const headers = {
|
|
"content-type": "application/json",
|
|
};
|
|
return await httpGet(`user-account/findById/${id}`, headers);
|
|
}
|
|
|
|
export async function createUserLevels(request: any) {
|
|
const headers = {
|
|
"content-type": "application/json",
|
|
};
|
|
return await httpPost(`user-levels`, headers, request);
|
|
}
|
|
|
|
export async function editUserLevels(id: string, request: any) {
|
|
const headers = {
|
|
"content-type": "application/json",
|
|
};
|
|
return await httpPut(`user-levels/${id}`, headers, request);
|
|
}
|