feat: 메뉴 저장 및 수정 작업

This commit is contained in:
2025-03-26 15:07:53 +09:00
parent 5b4e674214
commit d4f7cf140e
15 changed files with 202 additions and 87 deletions
+14 -1
View File
@@ -1,8 +1,21 @@
import { client } from "@/shared/api";
import { ENDPOINT } from "@/shared/config";
import type { Menu, MenuService, TreeMenu } from "../model/menu-interface";
import type {
Menu,
MenuFormData,
MenuService,
TreeMenu,
} from "../model/menu-interface";
export class MenuApiService implements MenuService {
public async createMenu(data: MenuFormData): Promise<void> {
const response = await client.post<void>(
`${ENDPOINT.CMS_SERVICE.MENUS}`,
data,
);
return response.data;
}
public async getTreeMenuList(siteId: string): Promise<Menu[]> {
const response = await client.get<Menu[]>(
`${ENDPOINT.CMS_SERVICE.MENUS}/${siteId}/tree`,