Skip to content

Commit

Permalink
코드리뷰 정리
Browse files Browse the repository at this point in the history
  • Loading branch information
5upportPark committed Oct 24, 2024
1 parent cb9c4b3 commit aed3498
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/main/java/com/pjw/retry_view/entity/Notice.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public Notice(Long id, String content, Long viewCount, List<NoticeImage> noticeI
this.updatedAt = updatedAt;
}

public static Notice newNoticeFromReq(String content, Long createdBy, List<NoticeImage> images){
public static Notice newOne(String content, Long createdBy, List<NoticeImage> images){
return Notice.builder()
.content(content)
.viewCount(0L)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public List<NoticeDTO> getNoticeList(){

public NoticeDTO saveNotice(WriteNoticeRequest req){
List<NoticeImage> images = req.getImages().stream().map(NoticeImage::getNoticeImage).toList();
Notice notice = Notice.newNoticeFromReq(req.getContent(), req.getCreatedBy(), images);
Notice notice = Notice.newOne(req.getContent(), req.getCreatedBy(), images);
return noticeRepository.save(notice).toDTO();
}

Expand Down

0 comments on commit aed3498

Please sign in to comment.