Skip to content

Commit

Permalink
♻️: refactor 인증API Operation에 인증 설명 추가 #29
Browse files Browse the repository at this point in the history
  • Loading branch information
PgmJun committed Mar 4, 2024
1 parent 22210bf commit 764da66
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,22 @@ class AnswerController(
private val answerService: AnswerService
) {
@Auth
@Operation(summary = "답변 조회")
@Operation(summary = "[인증] 답변 조회")
@GetMapping("/v1/answer/{answerId}")
fun findAnswerById(@PathVariable answerId: Long): ApiResponse<AnswerInfoResponse> {
fun findAnswerInfoById(@PathVariable answerId: Long): ApiResponse<AnswerInfoResponse> {
return ApiResponse.success(answerService.findAnswerInfoById(answerId))
}

@Auth
@Operation(summary = "답변 공감")
@Operation(summary = "[인증] 답변 공감")
@PostMapping("/v1/answer/like/{answerId}")
fun likeAnswer(@PathVariable answerId: Long, @MemberId memberId: Long): ApiResponse<Any> {
answerService.likeAnswerById(memberId, answerId)
return ApiResponse.success()
}

@Auth
@Operation(summary = "답변 좋아요")
@Operation(summary = "[인증] 답변 공감 취소")
@DeleteMapping("/v1/answer/like/{answerId}")
fun dislikeAnswer(@PathVariable answerId: Long, @MemberId memberId: Long): ApiResponse<Any> {
answerService.dislikeAnswerById(memberId, answerId)
Expand Down

0 comments on commit 764da66

Please sign in to comment.