Skip to content

Commit

Permalink
✨ 크리에이터 찾기 토큰 없애기 (#108)
Browse files Browse the repository at this point in the history
* 🔥 크리에이터 찾기에서 Authentication 삭제

* 📝 Swagger 문서 업데이트
  • Loading branch information
MinseoKangQ authored Nov 15, 2024
1 parent 52a2c8e commit 9709f73
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,15 +96,12 @@ public SuccessResponse<?> getCreatorInfo(Authentication authentication) {
// 크리에이터 찾기
@GetMapping("/filtering")
public SuccessResponse<PageResponse<CreatorInfo>> filteringCreator(
Authentication authentication,
@PageableDefault(size = 12, page = 0) Pageable pageable,
@RequestParam(value = "price", required = false) Integer price,
@RequestParam(value = "category", required = false) String category,
@RequestParam(value = "align", defaultValue = "recently", required = false) String recently
) {
CustomOAuth2User customOAuth2User = (CustomOAuth2User) authentication.getPrincipal();
String providerId = customOAuth2User.getUsername();
PageResponse<CreatorInfo> res = creatorService.filteringCreator(providerId, pageable, price, category, recently);
PageResponse<CreatorInfo> res = creatorService.filteringCreator(pageable, price, category, recently);
return SuccessResponse.of(res);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,18 @@ SuccessResponse<?> createCreator(
})
@GetMapping
SuccessResponse<PageResponse<CreatorInfo>> filteringCreator(
Authentication authentication,
@PageableDefault(size = 12, page = 0) Pageable pageable,
@Parameter(description = "가격 필터링 기준 (선택)", example = "50000")
@Parameter(
description = """
가격 필터링 기준 (선택)
- 1만원 미만 : 10000
- 5만원 미만 : 50000
- 10만원 미만 : 100000
- 20만원 미만 : 200000
- 20만원 이상 : 200001
""",
example = "50000"
)
@RequestParam(value = "price", required = false) Integer price,
@Parameter(description = "카테고리 필터링 기준 (선택): PRINTS, VIDEO, SNS_POST 중 하나", example = "PRINTS")
@RequestParam(value = "category", required = false) String category,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ void createCreator(
GetCreatorRes getCreator(String nickname);

GetCreatorRes getCreatorInfo(Authentication authentication);
PageResponse<CreatorInfo> filteringCreator(String providerId, Pageable pageable, Integer price, String category, String align);
PageResponse<CreatorInfo> filteringCreator(Pageable pageable, Integer price, String category, String align);
}
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public GetCreatorRes getCreatorInfo(Authentication authentication){
}

@Override
public PageResponse<CreatorInfo> filteringCreator(String providerId, Pageable pageable, Integer price, String category, String align) {
public PageResponse<CreatorInfo> filteringCreator(Pageable pageable, Integer price, String category, String align) {

Sort sort = switch (align) {
case "lowPrice" -> Sort.by(Sort.Direction.ASC, "workList.startPrice");
Expand Down

0 comments on commit 9709f73

Please sign in to comment.