Skip to content
This repository has been archived by the owner on Oct 20, 2024. It is now read-only.

Commit

Permalink
Merge pull request #130 from FinFellows/develop
Browse files Browse the repository at this point in the history
NewsContent Response 수정
  • Loading branch information
EunbeenDev authored Jan 14, 2024
2 parents e35fc91 + b5489b6 commit 47b6a16
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
@NoArgsConstructor
public class EduContentResponse {
private Long id;
private LocalDateTime created_at;
private String title;
private String content;
private Boolean bookmarked;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ public Page<NewsContentResponse> getAllNewsContents(Long userId, Pageable pageab
List<NewsContentResponse> newsContentsResponses = newsContentsPage.getContent().stream()
.map(newsContent -> NewsContentResponse.builder()
.id(newsContent.getId())
.created_at(newsContent.getCreatedAt())
.title(newsContent.getTitle())
.content(newsContent.getContent())
.bookmarked(checkBookmarked(userId, newsContent.getId())) // 북마크 여부 확인
Expand All @@ -63,6 +64,7 @@ public NewsContentResponse getNewsContent(Long id) {

return NewsContentResponse.builder()
.id(newsContent.getId())
.created_at(newsContent.getCreatedAt())
.title(newsContent.getTitle())
.content(newsContent.getContent())
.build();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,16 @@
import lombok.Getter;
import lombok.NoArgsConstructor;

import java.time.LocalDate;
import java.time.LocalDateTime;

@Getter
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class NewsContentResponse {
private Long id;
private LocalDateTime created_at;
private String title;
private String content;
private Boolean bookmarked;
Expand Down

0 comments on commit 47b6a16

Please sign in to comment.