feat: 트리 메뉴 dnd 작업

This commit is contained in:
2025-03-24 16:11:35 +09:00
parent b459036a59
commit 539585f495
5 changed files with 106 additions and 46 deletions
+3 -3
View File
@@ -1,6 +1,6 @@
import { client } from "@/shared/api";
import { ENDPOINT } from "@/shared/config";
import type { Menu, MenuFormData, MenuService } from "../model/menu-interface";
import type { Menu, MenuService, TreeMenu } from "../model/menu-interface";
export class MenuApiService implements MenuService {
public async getMenuList(siteId: string): Promise<Menu[]> {
@@ -10,9 +10,9 @@ export class MenuApiService implements MenuService {
return response.data;
}
public async modifyMenu(menuCd: number, data: MenuFormData): Promise<void> {
public async modifyMenu(siteId: string, data: TreeMenu[]): Promise<void> {
const response = await client.put<void>(
`${ENDPOINT.CMS_SERVICE.MENUS}/${menuCd}`,
`${ENDPOINT.CMS_SERVICE.MENUS}/${siteId}/tree`,
data,
);
return response.data;