diff --git a/src/main/java/com/umc/StudyFlexBE/controller/StudyController.java b/src/main/java/com/umc/StudyFlexBE/controller/StudyController.java index 9954415..c4f4849 100644 --- a/src/main/java/com/umc/StudyFlexBE/controller/StudyController.java +++ b/src/main/java/com/umc/StudyFlexBE/controller/StudyController.java @@ -16,7 +16,7 @@ import java.util.Map; @RestController -@PreAuthorize("hasAnyRole('USER')") +@PreAuthorize("hasAnyRole('ROLE_USER','ROLE_ADMIN','ROLE_CERTIFIED')") @RequestMapping("/app/studies") public class StudyController { private final StudyService studyService; diff --git a/src/main/java/com/umc/StudyFlexBE/dto/response/StudyNoticesRes.java b/src/main/java/com/umc/StudyFlexBE/dto/response/StudyNoticesRes.java index 843bdc0..346c72b 100644 --- a/src/main/java/com/umc/StudyFlexBE/dto/response/StudyNoticesRes.java +++ b/src/main/java/com/umc/StudyFlexBE/dto/response/StudyNoticesRes.java @@ -14,4 +14,5 @@ public class StudyNoticesRes { private String title; private LocalDateTime createAt; + private long noticeId; } diff --git a/src/main/java/com/umc/StudyFlexBE/service/StudyService.java b/src/main/java/com/umc/StudyFlexBE/service/StudyService.java index cfd3809..0b51f15 100644 --- a/src/main/java/com/umc/StudyFlexBE/service/StudyService.java +++ b/src/main/java/com/umc/StudyFlexBE/service/StudyService.java @@ -285,6 +285,7 @@ public StudyNoticesInfoRes getStudyNotices(Long studyId, String email) { .stream() .map(studyNotice -> StudyNoticesRes.builder() + .noticeId(studyNotice.getId()) .title(studyNotice.getTitle()) .createAt(studyNotice.getCreatedAt()) .build()