Class TeamCommentController

java.lang.Object
inha.git.team.api.controller.TeamCommentController

@RestController @RequestMapping("/api/v1/teams/comments") public class TeamCommentController extends Object
  • Constructor Details

    • TeamCommentController

      public TeamCommentController()
  • Method Details

    • getAllCommentsByTeamPostIdx

      @GetMapping public BaseResponse<List<CommentWithRepliesResponse>> getAllCommentsByTeamPostIdx(@RequestParam("postIdx") Integer postIdx)
      특정 팀 게시글 댓글 전체 조회 API
      Parameters:
      postIdx - 게시글 식별자
      Returns:
      BaseResponse<List>
    • createComment

      @PostMapping public BaseResponse<TeamCommentResponse> createComment(@AuthenticationPrincipal User user, @Validated @RequestBody CreateCommentRequest createCommentRequest)
      팀 게시글 댓글 생성 API
      Parameters:
      user - 사용자 정보
      createCommentRequest - 댓글 생성 요청
      Returns:
      BaseResponse
    • updateComment

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

      @DeleteMapping("/{commentIdx}") public BaseResponse<TeamCommentResponse> deleteComment(@AuthenticationPrincipal User user, @PathVariable("commentIdx") Integer commentIdx)
      팀 게시글 댓글 삭제 API
      Parameters:
      user - 사용자 정보
      commentIdx - 댓글 식별자
      Returns:
      BaseResponse
    • createReplyComment

      @PostMapping("/reply") public BaseResponse<TeamReplyCommentResponse> createReplyComment(@AuthenticationPrincipal User user, @Validated @RequestBody CreateReplyCommentRequest createReplyCommentRequest)
    • updateReplyComment

      @PutMapping("/reply/{replyCommentIdx}") public BaseResponse<TeamReplyCommentResponse> updateReplyComment(@AuthenticationPrincipal User user, @PathVariable("replyCommentIdx") Integer replyCommentIdx, @Validated @RequestBody UpdateCommentRequest updateCommentRequest)
      팀 게시글 대댓글 수정 API
      Parameters:
      user - 사용자 정보
      replyCommentIdx - 대댓글 식별자
      updateCommentRequest - 대댓글 수정 요청
      Returns:
      BaseResponse
    • deleteReplyComment

      @DeleteMapping("/reply/{replyCommentIdx}") public BaseResponse<TeamReplyCommentResponse> deleteReplyComment(@AuthenticationPrincipal User user, @PathVariable("replyCommentIdx") Integer replyCommentIdx)
      팀 게시글 대댓글 삭제 API
      Parameters:
      user - 사용자 정보
      replyCommentIdx - 대댓글 식별자
      Returns:
      BaseResponse