Skip to content

[ Community ] 신고 누적 자동 숨김이 목록·상세에서 동작하지 않는다 #88

Description

@RosieOh

💚 어떤 기능인가요?

ModerationService 는 신고가 임계치(app.community.auto-hide-report-threshold)를 넘으면
post.setIsActive(false) 로 글을 감춘다. 그런데 감춰지지 않는다.

// CommunityService.getAllPostsPage<Post> postPage = postRepository.findAll(pageable); // isActive 필터 없음

findPopularPosts, findLatestPosts, findByKeyword 는 전부 WHERE p.isActive = true
걸고 있는데 기본 목록 조회만 빠져 있다. 그래서 더 눈에 띄지 않았다.

getPostByIdfindById링크만 알면 숨긴 글이 그대로 열린다.
목록에서만 감추고 상세를 열어두면, 이미 링크가 퍼진 글에는 숨김이 아무 효과가 없다.

즉 자동 숨김 기능이 사실상 동작하지 않는 상태다.

✅ To Dos

  • 기본 목록 조회에 isActive 필터 적용
  • 상세 조회에 isActive 필터 적용
  • 조회수 증가 쿼리도 숨김 글은 세지 않도록
  • 관리자 목록(/api/admin/community/posts)은 모더레이션을 위해 숨김 글도 보여야 하므로 그대로 유지
  • 회귀 테스트 추가

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    domain:apiAPI 계약/스키마priority:P1높은 우선순위type:bug버그/회귀 이슈

    Type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions