Skip to content

Commit

Permalink
Fix: add noticeId at getStudyNotices response
Browse files Browse the repository at this point in the history
  • Loading branch information
Yeeun411 committed Jan 15, 2024
1 parent a22ea73 commit 4e4167b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@
public class StudyNoticesRes {
private String title;
private LocalDateTime createAt;
private long noticeId;
}
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 4e4167b

Please sign in to comment.