Skip to content

feat: 읽음 조회 API 추가 - #59

Merged
s26047-code merged 1 commit into
developfrom
feat/notification-unread-count
Aug 21, 2026
Merged

feat: 읽음 조회 API 추가#59
s26047-code merged 1 commit into
developfrom
feat/notification-unread-count

Conversation

@s26047-code

Copy link
Copy Markdown
Contributor

구현 내용

알림 읽음 처리 및 안 읽은 개수 조회 기능 추가

  • 알림 목록 조회 시 자동 읽음 처리
  • 헤더 표시용 안 읽은 알림 개수 조회 API 추가

변경 사항

notification

  • NotificationRepositorycountByReceiverIdAndIsReadFalse() 추가
  • NotificationService.getCommentAlarms(), getLikeAlarms()에서 조회한 알림들 자동 읽음 처리 (markAsRead() 호출, 더티체킹)
  • NotificationService.getUnreadCount() 메서드 추가
  • NotificationController/alarm/unread-count 엔드포인트 추가

테스트 방법

  • 안 읽은 알림이 있는 상태에서 /alarm/unread-count 호출 시 정확한 개수가 반환되는지 확인한다.
  • /alarm/comment 또는 /alarm/like 호출 후 해당 알림들이 읽음 처리되는지 확인한다.
  • 읽음 처리 후 다시 /alarm/unread-count 호출 시 개수가 줄어드는지 확인한다.

참고사항

  • 읽음 처리를 위한 별도 API는 만들지 않았으며, 알림 목록 조회 자체가 읽음 처리를 겸합니다.

@s26047-code
s26047-code merged commit dfd1a0f into develop Aug 21, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants