Files
frontend/apps/as/src/entities/menu-authority/api/menu-authority-service.ts
T

20 lines
659 B
TypeScript

import { client } from "@/shared/api";
import { ENDPOINT } from "@/shared/config";
import type {
MenuAuthorityService,
PageMenuAuthority,
} from "../model/menu-authority-interface";
export class MenuAuthorityApiService implements MenuAuthorityService {
/** MenuAuthrtApiController GET /api/v1/menu-authrts/pageinfo/{menuCd} */
async getPageMenuAuthority(menuCd: number): Promise<PageMenuAuthority[]> {
const response = await client.get<PageMenuAuthority[]>(
`${ENDPOINT.CMS_SERVICE.MENU_AUTHRTS}/pageinfo/${menuCd}`,
);
return response.data;
}
}
export const MenuAuthorityApi = new MenuAuthorityApiService();