Skip to content

Commit

Permalink
Merge pull request #82 from BudgetBuddiesTeam/refactor/#86
Browse files Browse the repository at this point in the history
[Refactor] CommentController Http method 변경
  • Loading branch information
wnd01jun authored Aug 8, 2024
2 parents a489b3c + d6fb5b2 commit 92bb166
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public ApiResponse<Page<CommentResponseDto.SupportInfoCommentDto>> findAllBySupp
return ApiResponse.onSuccess(result);
}

@PostMapping("/comments/delete/{commentId}")
@DeleteMapping("/comments/delete/{commentId}")
public ApiResponse<String> deleteComment(@PathVariable("commentId") @ExistComment Long commentId) {
discountCommentService.deleteComment(commentId);
return ApiResponse.onSuccess("ok");
Expand All @@ -82,7 +82,7 @@ public ApiResponse<CommentResponseDto.SupportInfoCommentDto> findSupportOne(@Pat
return ApiResponse.onSuccess(result);
}

@PostMapping("/supports/comments/modify")
@PutMapping("/supports/comments/modify")
public ApiResponse<CommentResponseDto.SupportInfoCommentDto> modifySupportOne(
@RequestBody CommentRequestDto.CommentModifyDto dto) {
CommentResponseDto.SupportInfoCommentDto result = supportCommentService.modifyComment(dto);
Expand All @@ -95,13 +95,11 @@ public ApiResponse<CommentResponseDto.DiscountInfoCommentDto> findDiscountOne(@P
return ApiResponse.onSuccess(result);
}

@PostMapping("/discounts/comments/modify")
@PutMapping("/discounts/comments/modify")
public ApiResponse<CommentResponseDto.DiscountInfoCommentDto> modifyDiscountOne(
@RequestBody CommentRequestDto.CommentModifyDto dto) {
CommentResponseDto.DiscountInfoCommentDto result = discountCommentService.modifyComment(dto);
return ApiResponse.onSuccess(result);
}



}
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ ApiResponse<Page<CommentResponseDto.SupportInfoCommentDto>> findAllBySupportInfo
})
public ApiResponse<String> deleteComment(@PathVariable("commentId") @ExistComment Long commentId);

@Operation(summary = "[User] SupportInfo의 댓글 요청 API ", description = "특정 댓글을 요청하는 API입니다.")
@Operation(summary = "[User] SupportInfo의 특정 댓글 요청 API ", description = "특정 댓글을 요청하는 API입니다.")
@ApiResponses({
@io.swagger.v3.oas.annotations.responses.ApiResponse(responseCode = "COMMON200", description = "OK, 성공"),
})
Expand All @@ -107,7 +107,7 @@ ApiResponse<CommentResponseDto.SupportInfoCommentDto> modifySupportOne(
@RequestBody CommentRequestDto.CommentModifyDto dto);


@Operation(summary = "[User] DiscountInfo의 댓글 요청 API ", description = "특정 댓글을 요청하는 API입니다.")
@Operation(summary = "[User] DiscountInfo의 특정 댓글 요청 API", description = "특정 댓글을 요청하는 API입니다.")
@ApiResponses({
@io.swagger.v3.oas.annotations.responses.ApiResponse(responseCode = "COMMON200", description = "OK, 성공"),
})
Expand Down

0 comments on commit 92bb166

Please sign in to comment.