15 lines
457 B
TypeScript
15 lines
457 B
TypeScript
import { client } from "@/shared/api";
|
|
import { ENDPOINT } from "@/shared/config";
|
|
import type { MenuItem, MenuService } from "../model/menu-interface";
|
|
|
|
export class MenuApiService implements MenuService {
|
|
async getMenuRoles(siteId: string): Promise<MenuItem[]> {
|
|
const response = await client.get<MenuItem[]>(
|
|
`${ENDPOINT.CMS_SERVICE.MENU_ROLES}/${siteId}`,
|
|
);
|
|
return response.data;
|
|
}
|
|
}
|
|
|
|
export const MenuApi = new MenuApiService();
|