Skip to content

Commit

Permalink
💡 [ADD] 컨트롤러 기능 주석 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
kchaeeun committed Aug 19, 2024
1 parent 5c74110 commit d98da0d
Showing 1 changed file with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,14 @@ public class NotificationController {
private final NotificationService notificationService;

// Last-Event-ID는 SSE 연결이 끊어졌을 경우, 클라이언트가 수신한 마지막 데이터 ID 값을 의미, 항상 존재 X -> false

/**
* 알림을 위한 구독 API
* [GET] /notification/subscribe
* @param authUser
* @param lastEventId
* @return
*/
@GetMapping(value = "/subscribe", produces = "text/event-stream")
public SseEmitter subscribe(
@AuthenticationPrincipal AuthUser authUser,
Expand All @@ -28,6 +36,12 @@ public SseEmitter subscribe(
return notificationService.subscribe(user, lastEventId);
}

/**
* 알림 전체 조회
* [GET] /notification
* @param authUser
* @return
*/
@GetMapping
public ResponseEntity<List<NotificationResponse>> getNotificationList(
@AuthenticationPrincipal AuthUser authUser) {
Expand Down

0 comments on commit d98da0d

Please sign in to comment.