Skip to content

Commit

Permalink
refactor: Modify CommentController (#31)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ahyun0326 committed Mar 22, 2024
1 parent 696703c commit 08ae598
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import com.beotkkot.qtudy.dto.request.comments.CommentsRequestDto;
import com.beotkkot.qtudy.dto.response.comments.CommentsResponseDto;
import com.beotkkot.qtudy.dto.response.comments.DeleteCommentsResponseDto;
import com.beotkkot.qtudy.dto.response.comments.GetCommentsAllResponseDto;
import com.beotkkot.qtudy.dto.response.posts.PostsResponseDto;
import com.beotkkot.qtudy.service.auth.AuthService;
Expand Down Expand Up @@ -66,7 +67,7 @@ public ResponseEntity<? super CommentsResponseDto> patchComment(@RequestParam("p

// 댓글 삭제
@DeleteMapping("/posts/comments")
public ResponseEntity<? super CommentsResponseDto> deleteComment(@RequestParam("postId") Long postId, @RequestParam("commentId") Long commentId, @RequestHeader("Authorization") String token) {
public ResponseEntity<? super DeleteCommentsResponseDto> deleteComment(@RequestParam("postId") Long postId, @RequestParam("commentId") Long commentId, @RequestHeader("Authorization") String token) {
Long kakao_uid;
try {
kakao_uid = authService.getKakaoUserInfo(token).getId();
Expand All @@ -78,7 +79,7 @@ public ResponseEntity<? super CommentsResponseDto> deleteComment(@RequestParam("
return PostsResponseDto.databaseError();
}

ResponseEntity<? super CommentsResponseDto> response = commentService.deleteComment(postId, commentId, kakao_uid);
ResponseEntity<? super DeleteCommentsResponseDto> response = commentService.deleteComment(postId, commentId, kakao_uid);
return response;
}
}

0 comments on commit 08ae598

Please sign in to comment.