Skip to content

Commit

Permalink
fix(#125) : 보유중인 인증서 조회 시 WebToken 반환하도록 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
aeeazip committed Aug 21, 2023
1 parent 5bf2a42 commit dbd8a1c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/main/java/trothly/trothcam/dto/web/ProductsResDto.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public class ProductsResDto<T> {

private Long productId;
private String title;
private String ownerWebId;
private String ownerWebToken;
private LocalDateTime soldAt;
private Long price;
private boolean isLiked;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@ public List<ProductsResDto> findPublicProducts(String webId) throws BaseExceptio
boolean isLiked = likeProductRepository.existsByProduct_IdAndMember_Id(p.getId(), p.getMember().getId());

if(history.isEmpty())
return new ProductsResDto(p.getId(), p.getTitle(), p.getMember().getWebId(),
return new ProductsResDto(p.getId(), p.getTitle(), p.getMember().getWebToken(),
p.getLastModifiedAt(), p.getPrice(), isLiked);

return new ProductsResDto(p.getId(), p.getTitle(), p.getMember().getWebId(),
return new ProductsResDto(p.getId(), p.getTitle(), p.getMember().getWebToken(),
history.get().getSoldAt(), p.getPrice(), isLiked);

})
Expand All @@ -89,7 +89,7 @@ public List<ProductsResDto> findPrivateProducts(String webId) throws BaseExcepti
price = 0L;
}

return new ProductsResDto(p.getId(), p.getTitle(), p.getMember().getWebId(),
return new ProductsResDto(p.getId(), p.getTitle(), p.getMember().getWebToken(),
soldAt, price, isLiked);
})
.collect(Collectors.toList());
Expand Down

0 comments on commit dbd8a1c

Please sign in to comment.