fix(board-menu): 게시판 삭제/복원 시 메뉴 연동 로직 개선
- BoardController: *Board() → *AnyBoard() 메서드로 변경하여 메뉴 연동 활성화 - MenuService: restoreMenuForBoard() 메서드 추가 - soft-deleted 메뉴 있으면 복원 - 활성 메뉴가 이미 있으면 스킵 (중복 방지) - 둘 다 없으면 새로 생성 - BoardService: restoreAnyBoard()에서 board name 전달하도록 수정 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -143,11 +143,11 @@ public function update(Request $request, int $id): JsonResponse
|
||||
}
|
||||
|
||||
/**
|
||||
* 게시판 삭제 (Soft Delete)
|
||||
* 게시판 삭제 (Soft Delete) - 연결된 메뉴도 함께 삭제
|
||||
*/
|
||||
public function destroy(int $id): JsonResponse
|
||||
{
|
||||
$this->boardService->deleteBoard($id);
|
||||
$this->boardService->deleteAnyBoard($id);
|
||||
|
||||
return response()->json([
|
||||
'success' => true,
|
||||
@@ -156,11 +156,11 @@ public function destroy(int $id): JsonResponse
|
||||
}
|
||||
|
||||
/**
|
||||
* 게시판 복원
|
||||
* 게시판 복원 - 연결된 메뉴도 함께 복원
|
||||
*/
|
||||
public function restore(int $id): JsonResponse
|
||||
{
|
||||
$this->boardService->restoreBoard($id);
|
||||
$this->boardService->restoreAnyBoard($id);
|
||||
|
||||
return response()->json([
|
||||
'success' => true,
|
||||
@@ -169,11 +169,11 @@ public function restore(int $id): JsonResponse
|
||||
}
|
||||
|
||||
/**
|
||||
* 게시판 영구 삭제
|
||||
* 게시판 영구 삭제 - 연결된 메뉴도 함께 영구 삭제
|
||||
*/
|
||||
public function forceDestroy(int $id): JsonResponse
|
||||
{
|
||||
$this->boardService->forceDeleteBoard($id);
|
||||
$this->boardService->forceDeleteAnyBoard($id);
|
||||
|
||||
return response()->json([
|
||||
'success' => true,
|
||||
|
||||
Reference in New Issue
Block a user