From c0105c6847344955fb800fb4a7e783ee53f9d9bd Mon Sep 17 00:00:00 2001 From: GA Pro Date: Thu, 14 May 2026 01:22:47 +0900 Subject: [PATCH] =?UTF-8?q?=EB=8F=99=EA=B8=B0=ED=99=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/ga/api/controller/notice/NoticeController.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/ga-api/src/main/java/com/ga/api/controller/notice/NoticeController.java b/ga-api/src/main/java/com/ga/api/controller/notice/NoticeController.java index edd9fb3..5199c11 100644 --- a/ga-api/src/main/java/com/ga/api/controller/notice/NoticeController.java +++ b/ga-api/src/main/java/com/ga/api/controller/notice/NoticeController.java @@ -76,15 +76,17 @@ public class NoticeController { @GetMapping("/api/user-notifications/unread-count") @RequirePermission(menu = "NOTICE", perm = "READ") - public ApiResponse unreadCount(@RequestParam Long userId) { - return ApiResponse.ok(service.unreadCount(userId)); + public ApiResponse unreadCount(@RequestParam(required = false) Long userId) { + Long target = userId != null ? userId : SecurityUtil.getCurrentUserId(); + return ApiResponse.ok(service.unreadCount(target)); } @PostMapping("/api/user-notifications/{notificationId}/read") @RequirePermission(menu = "NOTICE", perm = "READ") public ApiResponse markRead(@PathVariable Long notificationId, - @RequestParam Long userId) { - service.markRead(notificationId, userId); + @RequestParam(required = false) Long userId) { + Long target = userId != null ? userId : SecurityUtil.getCurrentUserId(); + service.markRead(notificationId, target); return ApiResponse.ok(); }