import { roleType } from "@/types/role";
import { systemMenueType } from "@/types/systemMenue";
import api from "@/lib/request";

export async function roleDataList(): Promise<roleType[]> {
  let roleList: roleType[] =[];
  let getData =  await api().get('/role/list');
  roleList = getData.data.list;
  return roleList
}

export async function menueDataList (): Promise<systemMenueType[]> {
  let menueList: systemMenueType[] =[];
  let getData =  await api().get('/system-menue/list?all=true');
  menueList = getData.data.list;
  return menueList
}