Skip to content

Commit

Permalink
Merge pull request #165 from masters2023-4th-project-carrot-talk/dev
Browse files Browse the repository at this point in the history
[be] 알림 컨트롤러에 로그 추가 배포
  • Loading branch information
devbattery committed Oct 5, 2023
2 parents e24fddc + 7d3862c commit 668513f
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@
import com.example.carrot.notification.service.NotificationService;

import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;

@Slf4j
@RequestMapping("/api/notification")
@RequiredArgsConstructor
@RestController
Expand All @@ -23,6 +25,8 @@ public class NotificationController {

@GetMapping(value = "/subscribe", produces = MediaType.TEXT_EVENT_STREAM_VALUE)
public ResponseEntity<SseEmitter> connect(@RequestAttribute Long userId) {
log.info("userId: {}", userId);

return ResponseEntity.ok()
.header("X-Accel-Buffering", "no")
.body(notificationService.subscribe(userId));
Expand Down

0 comments on commit 668513f

Please sign in to comment.