Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -96,4 +96,18 @@ public static CommunityCategory toCommunityCategory(Long categoryId){
}
return communityCategory;
}

public static Long toCategoryId(CommunityCategory category) {
switch (category) {
case WORRY:
return 0L;
case MEDICAL:
return 1L;
case QUALIFICATION:
return 2L;
default:
return 3L;
}
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ public static MyPageResponseDTO.MyCommunityResDTO toMyCommunityRes(Community com
.title(community.getTitle())
.content(community.getContent())
.uploadedAt(community.getCreatedAt())
.category(community.getCommunityCategory().name())
.category(CommunityConverter.toCategoryId(community.getCommunityCategory()))
.commentCnt((long) community.getCommentList().size())
.imageUrl(imageUrl)
.build();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public static class MyCommunityResDTO {
String title;
String content;
LocalDateTime uploadedAt;
String category;
Long category;
Long commentCnt;
String imageUrl;
}
Expand Down
Loading