From d3735d51c2d90c7b596bb28b879b81cdfe780213 Mon Sep 17 00:00:00 2001 From: Namju Kim Date: Sat, 1 Jun 2024 01:19:24 +0900 Subject: [PATCH] =?UTF-8?q?Feat:=20RestAPI=20=EB=82=B4=20=ED=96=89?= =?UTF-8?q?=EC=82=AC=20=EB=A6=AC=EC=8A=A4=ED=8A=B8=20=EC=A1=B0=ED=9A=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../connect/luck/event/controller/EventRestController.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/main/java/ac/kr/deu/connect/luck/event/controller/EventRestController.java b/src/main/java/ac/kr/deu/connect/luck/event/controller/EventRestController.java index 2866f78..633e987 100644 --- a/src/main/java/ac/kr/deu/connect/luck/event/controller/EventRestController.java +++ b/src/main/java/ac/kr/deu/connect/luck/event/controller/EventRestController.java @@ -89,4 +89,11 @@ public ResponseEntity changeEventStatus( eventService.changeEventStatus(id, eventStatus, principal.getName()); return ResponseEntity.ok("이벤트 상태 변경 성공"); } + + @GetMapping("/my") + @PreAuthorize("hasRole('ROLE_EVENT_MANAGER')") + @Operation(summary = "내 이벤트 목록 조회", description = "내가 생성한 이벤트 목록 조회") + public ResponseEntity> getMyEvent(Principal principal) { + return ResponseEntity.ok(eventService.getEvents(principal.getName())); + } }