Skip to content

Commit

Permalink
Chore: style에 맞게 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
yr0202 committed Feb 4, 2025
1 parent 11dc493 commit 61636b9
Showing 1 changed file with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ public class CommentController {

@Operation(
description = "커서 기반 페이징 처리된 댓글 조회 기능입니다. 처음 조회시에는 cursorKey를 null로 보내시면 됩니다",
summary = "댓글 조회 (커서 기반 페이징)")
summary = "댓글 조회 (커서 기반 페이징)"
)
@GetMapping
public ResponseEntity<LongCursorResponse<CommentReadResponse>> getAllCommentsByPostId(
@AuthenticationPrincipal CustomOAuth2User auth,
Expand All @@ -63,12 +64,14 @@ public ResponseEntity<LongCursorResponse<CommentReadResponse>> getAllCommentsByP

@Operation(
description = "해당 게시글에 댓글을 등록할 수 있습니다. 댓글과 대댓글까지 작성할 수 있습니다.",
summary = "댓글/대댓글 등록")
summary = "댓글/대댓글 등록"
)
@PostMapping
public ResponseEntity<Void> registerCommentByPostId(
@AuthenticationPrincipal CustomOAuth2User auth,
@RequestParam Long postId,
@RequestBody @Valid CommentRegisterRequest request) {

if (auth == null || auth.getId() == null) {
throw new GeneralException(ResponseCode.EMPTY_TOKEN);
}
Expand All @@ -80,12 +83,14 @@ public ResponseEntity<Void> registerCommentByPostId(

@Operation(
description = "해당 게시글에 본인이 작성한 댓글/대댓글을 수정할 수 있습니다.",
summary = "댓글/대댓글 수정")
summary = "댓글/대댓글 수정"
)
@PutMapping("/{commentId}")
public ResponseEntity<Void> updateCommentByPostId(
@AuthenticationPrincipal CustomOAuth2User auth,
@PathVariable Long commentId,
@RequestBody @Valid CommentUpdateRequest request) {

if (auth == null || auth.getId() == null) {
throw new GeneralException(ResponseCode.EMPTY_TOKEN);
}
Expand All @@ -97,7 +102,8 @@ public ResponseEntity<Void> updateCommentByPostId(

@Operation(
description = "내가 작성한 댓글을 삭제하는 기능입니다",
summary = "댓글 삭제")
summary = "댓글 삭제"
)
@DeleteMapping("/{commentId}")
public ResponseEntity<Void> deleteCommentByPostId(
@AuthenticationPrincipal CustomOAuth2User auth,
Expand Down

0 comments on commit 61636b9

Please sign in to comment.