fix: 목록 태그 필터도 게시판별로 — /board/tags?category 로 매핑된 그룹 태그만
CI / build (push) Failing after 12m6s

- 게시판 목록 화면의 태그 필터가 전체 태그를 보여주던 문제(매핑 무시) 수정
- 글쓰기와 동일한 listWritableGroups 기준으로 일관 적용

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
ByungCheol
2026-06-28 15:44:24 +09:00
parent d5366e8e72
commit a4b6c3fd2d
@@ -120,10 +120,18 @@ public class BoardController {
return ResponseEntity.noContent().build(); return ResponseEntity.noContent().build();
} }
/** 목록 태그 필터 — 게시판 지정 시 그 게시판에 매핑된 그룹의 태그만 */
@GetMapping("/tags") @GetMapping("/tags")
public List<String> tags() { public List<String> tags(@RequestParam(required = false) String category) {
if (category == null || category.isBlank()) {
return boardService.allTags(); return boardService.allTags();
} }
return tagService.listWritableGroups(category).stream()
.flatMap(g -> g.getTags().stream())
.map(com.sb.web.board.dto.TagResponse::getName)
.distinct()
.toList();
}
/** 글 작성 시 선택 가능한 태그 (해당 게시판에 매핑된 그룹만) */ /** 글 작성 시 선택 가능한 태그 (해당 게시판에 매핑된 그룹만) */
@GetMapping("/tag-groups") @GetMapping("/tag-groups")