Skip to content

Commit

Permalink
🐛[fix]: 마이페이지 좋아요한 명언 목록 조회시 likeId 누락(삭제시 필요)
Browse files Browse the repository at this point in the history
  • Loading branch information
Hyesooo committed Nov 6, 2023
1 parent 618a9e9 commit 872cf26
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/main/java/com/pingpong/quoteBakery/app/dto/QuoteDto.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,7 @@ public class QuoteDto extends BaseDto {

// quoteConverter likes 변환용
private Long userId;

private Long likeId;
}

Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,11 @@ public QuoteDto getRandomQuoteWithSingle(QuoteSingleSearchDto searchDto) {
public List<QuoteDto> getLikedQuotes(Long userId) {

return likeRepository.findAllByUser_Id(userId)
.stream().map(entity ->
quoteConverter.convertToGeneric(entity.getQuote(), QuoteDto.class))
.stream().map(entity -> {
QuoteDto dto = quoteConverter.convertToGeneric(entity.getQuote(), QuoteDto.class);
dto.setLikeId(entity.getLikeId());
return dto;
})
.collect(Collectors.toList());
}

Expand Down

0 comments on commit 872cf26

Please sign in to comment.