Skip to content

Commit

Permalink
feat: 좋아요, 리뷰 조회 성능 테스트 세팅
Browse files Browse the repository at this point in the history
  • Loading branch information
EunChanNam committed Nov 29, 2023
1 parent a86e57e commit 83c6d0a
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,27 +10,37 @@
import com.inq.wishhair.wesharewishhair.global.resolver.dto.AuthInfo;
import com.inq.wishhair.wesharewishhair.review.application.LikeReviewTestService;

import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.responses.ApiResponse;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;

@Tag(name = "테스트 API")
@RestController
@RequiredArgsConstructor
@RequestMapping("/api/like")
public class LikeReviewTestController {

private final LikeReviewTestService likeReviewService;

@Operation(summary = "좋아요 클린 API")
@ApiResponse(responseCode = "200", useReturnTypeSchema = true)
@PostMapping("/test/clean")
public Success clean() {
likeReviewService.clean();
return new Success();
}

@Operation(summary = "좋아요 카운팅 API")
@ApiResponse(responseCode = "200", useReturnTypeSchema = true)
@PostMapping("/test/count/{reviewId}")
public Result count(@PathVariable Long reviewId) {
likeReviewService.clean();
return new Result(likeReviewService.count(reviewId));
}

@Operation(summary = "락 좋아요 API")
@ApiResponse(responseCode = "200", useReturnTypeSchema = true)
@PostMapping("/test/lock/{reviewId}")
public Success withLock(
@PathVariable Long reviewId,
Expand All @@ -40,6 +50,8 @@ public Success withLock(
return new Success();
}

@Operation(summary = "논락 좋아요 API")
@ApiResponse(responseCode = "200", useReturnTypeSchema = true)
@PostMapping("/test/no_lock/{reviewId}")
public Success withoutLock(
@PathVariable Long reviewId,
Expand Down

0 comments on commit 83c6d0a

Please sign in to comment.