Skip to content

Commit

Permalink
fix: 공고 상세 조회 api 누락된 필드 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
kikingki committed Sep 21, 2024
1 parent 206776f commit d8bf570
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ public class InfoPostDetailRes {
private final String content;
private final String detailUrl;
private final Integer viewCount;
private final String imageUrl;

@Getter
@AllArgsConstructor
Expand All @@ -38,6 +39,7 @@ public static class InfoPostInfo {
private String detailUrl;
private Integer viewCount;
private Boolean reported;
private final String imageUrl;
}

public static InfoPostDetailRes of(InfoPostInfo infoPostInfo, List<PositionInfo> positionInfos) {
Expand All @@ -52,6 +54,7 @@ public static InfoPostDetailRes of(InfoPostInfo infoPostInfo, List<PositionInfo>
formatPeriod(infoPostInfo.getActivityStartDate(), infoPostInfo.getActivityEndDate()))
.content(infoPostInfo.getContent() == null ? "" : infoPostInfo.getContent())
.detailUrl(infoPostInfo.getDetailUrl())
.imageUrl(infoPostInfo.getImageUrl())
.viewCount(infoPostInfo.getViewCount())
.build();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ public InfoPostInfo findById(Long infoPostId) {
infoPost.content.as("content"),
infoPost.detailUrl.as("detailUrl"),
infoPost.viewCount.as("viewCount"),
infoPost.reported.as("reported")
infoPost.reported.as("reported"),
infoPost.image.imageUrl.as("imageUrl")
))
.from(infoPost)
.where(infoPost.id.eq(infoPostId))
Expand Down

0 comments on commit d8bf570

Please sign in to comment.