Skip to content

Commit

Permalink
fix(#125) : Member 주입 주석 처리
Browse files Browse the repository at this point in the history
  • Loading branch information
aeeazip committed Aug 22, 2023
1 parent 7ea3475 commit f8741b9
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,23 +91,24 @@ public BaseResponse<ProductsPagingListResDto> getProducts(@PathVariable String t

/* 메인 화면 페이징 처리 - 로그인0 */
@GetMapping("/{webId}/product-ranking/{type}/{page}")
public BaseResponse<ProductsPagingListResDto> getProducts(@PathVariable String webId, @PathVariable String type, @PathVariable int page, @AuthenticationPrincipal Member member) {
log.info("Member: " + member.toString());
public BaseResponse<ProductsPagingListResDto> getProducts(@PathVariable String webId, @PathVariable String type, @PathVariable int page) {
//log.info("Member: " + member.toString());
log.info("프론트 요청 webId: " + webId);
log.info("프론트 요청 webtype: " + type);
log.info("api 요청 들어옴");
if(!member.getWebId().equals(webId)) {
throw new BaseException(MEMBER_NOT_FOUND);
}

if(type.equals("top") && page >= 0) {
log.info("top 조건 해당");
return BaseResponse.onSuccess(productService.getProductsLikedTop(page, member));
} else if (type.equals("latest") && page >= 0) {
return BaseResponse.onSuccess(productService.getProductsLikedLatest(page, member));
} else {
throw new BaseException(REQUEST_ERROR);
}
// if(!member.getWebId().equals(webId)) {
// throw new BaseException(MEMBER_NOT_FOUND);
// }
//
// if(type.equals("top") && page >= 0) {
// log.info("top 조건 해당");
// return BaseResponse.onSuccess(productService.getProductsLikedTop(page, member));
// } else if (type.equals("latest") && page >= 0) {
// return BaseResponse.onSuccess(productService.getProductsLikedLatest(page, member));
// } else {
// throw new BaseException(REQUEST_ERROR);
// }
return BaseResponse.onSuccess(null);
}

/* view all */
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/trothly/trothcam/domain/member/Member.java
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ public String getPassword() {
// 계정 이름
@Override
public String getUsername() {
return null;
return getName();
}

// 계정의 만료 여부
Expand Down

0 comments on commit f8741b9

Please sign in to comment.