Class ProjectCommentController

java.lang.Object
inha.git.project.api.controller.ProjectCommentController

@RestController @RequestMapping("/api/v1/projects/comments") public class ProjectCommentController extends Object
ProjectCommentController는 project 댓글 관련 엔드포인트를 처리.
  • Constructor Details

    • ProjectCommentController

      public ProjectCommentController()
  • Method Details

    • getAllComments

      @GetMapping public BaseResponse<List<CommentWithRepliesResponse>> getAllComments(@AuthenticationPrincipal User user, @RequestParam("projectIdx") Integer projectIdx)
    • createComment

      @PostMapping public BaseResponse<CommentResponse> createComment(@AuthenticationPrincipal User user, @Validated @RequestBody CreateCommentRequest createCommentRequest)
      프로젝트 댓글 생성 API
      Parameters:
      user - 사용자 정보
      createCommentRequest - 댓글 생성 요청
      Returns:
      BaseResponse
    • updateComment

      @PutMapping("/{commentIdx}") public BaseResponse<CommentResponse> updateComment(@AuthenticationPrincipal User user, @PathVariable("commentIdx") Integer commentIdx, @Validated @RequestBody UpdateCommentRequest updateCommentRequest)
      프로젝트 댓글 수정 API
      Parameters:
      user - 사용자 정보
      commentIdx - 댓글 식별자
      updateCommentRequest - 댓글 수정 요청
      Returns:
      BaseResponse
    • deleteComment

      @DeleteMapping("/{commentIdx}") public BaseResponse<CommentResponse> deleteComment(@AuthenticationPrincipal User user, @PathVariable("commentIdx") Integer commentIdx)
      프로젝트 댓글 삭제 API
      Parameters:
      user - 사용자 정보
      commentIdx - 댓글 식별자
      Returns:
      BaseResponse
    • createReply

      @PostMapping("/reply") public BaseResponse<ReplyCommentResponse> createReply(@AuthenticationPrincipal User user, @Validated @RequestBody CreateReplyCommentRequest createReplyCommentRequest)
      프로젝트 댓글 답글 생성 API
      Parameters:
      user - 사용자 정보
      createReplyCommentRequest - 답글 생성 요청
      Returns:
      BaseResponse
    • updateReply

      @PutMapping("/reply/{replyCommentIdx}") public BaseResponse<ReplyCommentResponse> updateReply(@AuthenticationPrincipal User user, @PathVariable("replyCommentIdx") Integer replyCommentIdx, @Validated @RequestBody UpdateCommentRequest updateCommentRequest)
      프로젝트 댓글 답글 수정 API
      Parameters:
      user - 사용자 정보
      replyCommentIdx - 답글 식별자
      updateCommentRequest - 답글 수정 요청
      Returns:
      BaseResponse
    • deleteReply

      @DeleteMapping("/reply/{replyCommentIdx}") public BaseResponse<ReplyCommentResponse> deleteReply(@AuthenticationPrincipal User user, @PathVariable("replyCommentIdx") Integer replyCommentIdx)
      프로젝트 댓글 답글 삭제 API
      Parameters:
      user - 사용자 정보
      replyCommentIdx - 답글 식별자
      Returns:
      BaseResponse
    • projectCommentLike

      @PostMapping("/like") public BaseResponse<String> projectCommentLike(@AuthenticationPrincipal User user, @RequestBody @Valid @Valid CommentLikeRequest commentLikeRequest)
      프로젝트 댓글 좋아요 API

      특정 프로젝트 댓글에 좋아요를 합니다.

      Parameters:
      user - 로그인한 사용자 정보
      commentLikeRequest - 좋아요할 프로젝트 댓글 정보
      Returns:
      좋아요 성공 메시지를 포함하는 BaseResponse
    • projectCommentLikeCancel

      @DeleteMapping("/like") public BaseResponse<String> projectCommentLikeCancel(@AuthenticationPrincipal User user, @RequestBody @Valid @Valid CommentLikeRequest commentLikeRequest)
      프로젝트 댓글 좋아요 취소 API

      특정 프로젝트 댓글에 좋아요를 취소합니다.

      Parameters:
      user - 로그인한 사용자 정보
      commentLikeRequest - 좋아요할 프로젝트 댓글 정보
      Returns:
      좋아요 취소 성공 메시지를 포함하는 BaseResponse
    • projectReplyCommentLike

      @PostMapping("/reply/like") public BaseResponse<String> projectReplyCommentLike(@AuthenticationPrincipal User user, @RequestBody @Valid @Valid CommentLikeRequest commentLikeRequest)
      프로젝트 대댓글 좋아요 API

      특정 프로젝트 대댓글에 좋아요를 합니다.

      Parameters:
      user - 로그인한 사용자 정보
      commentLikeRequest - 좋아요할 프로젝트 대댓글 정보
      Returns:
      좋아요 성공 메시지를 포함하는 BaseResponse
    • projectReplyCommentLikeCancel

      @DeleteMapping("/reply/like") public BaseResponse<String> projectReplyCommentLikeCancel(@AuthenticationPrincipal User user, @RequestBody @Valid @Valid CommentLikeRequest commentLikeRequest)
      프로젝트 대댓글 좋아요 취소 API

      특정 프로젝트 대댓글에 좋아요를 취소합니다.

      Parameters:
      user - 로그인한 사용자 정보
      commentLikeRequest - 좋아요할 프로젝트 대댓글 정보
      Returns:
      좋아요 취소 성공 메시지를 포함하는 BaseResponse