From 4aed8c3e885b5d89aa90bea1e0b9b5a63da528fb Mon Sep 17 00:00:00 2001 From: wnd01jun Date: Wed, 31 Jul 2024 01:01:11 +0900 Subject: [PATCH] =?UTF-8?q?[remove]=20CommentController=20=EC=82=AD?= =?UTF-8?q?=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../comment/controller/CommentController.java | 62 ------------------- 1 file changed, 62 deletions(-) delete mode 100644 src/main/java/com/bbteam/budgetbuddies/domain/comment/controller/CommentController.java diff --git a/src/main/java/com/bbteam/budgetbuddies/domain/comment/controller/CommentController.java b/src/main/java/com/bbteam/budgetbuddies/domain/comment/controller/CommentController.java deleted file mode 100644 index 7ebab75e..00000000 --- a/src/main/java/com/bbteam/budgetbuddies/domain/comment/controller/CommentController.java +++ /dev/null @@ -1,62 +0,0 @@ -package com.bbteam.budgetbuddies.domain.comment.controller; - -import com.bbteam.budgetbuddies.domain.comment.dto.CommentRequestDto; -import com.bbteam.budgetbuddies.domain.comment.dto.CommentResponseDto; -import com.bbteam.budgetbuddies.domain.comment.service.before.CommentService; -import lombok.RequiredArgsConstructor; -import org.springframework.data.domain.Page; -import org.springframework.data.domain.Pageable; -import org.springframework.data.web.PageableDefault; -import org.springframework.http.ResponseEntity; -import org.springframework.web.bind.annotation.*; - -//@RestController -@RequiredArgsConstructor -public class CommentController implements CommentControllerApi { - - private final CommentService commentService; - - @PostMapping("/discounts/comments") - public ResponseEntity saveDiscountInfoComment( - @RequestParam("userId") Long userId, - @RequestBody CommentRequestDto.DiscountInfoCommentDto discountInfoCommentDto){ - CommentResponseDto.DiscountInfoCommentDto dto = commentService.saveDiscountComment(userId, discountInfoCommentDto); - return ResponseEntity.ok(dto); - } - - - @GetMapping("/discounts/comments") - public ResponseEntity> findAllByDiscountInfo( - @RequestParam("discountInfoId") Long discountInfoId, - @PageableDefault(size = 20, page = 0) Pageable pageable){ - Page result = commentService.findByDiscountInfoWithPaging(discountInfoId, pageable); - return ResponseEntity.ok(result); - } - - - @PostMapping("/supports/comments") - public ResponseEntity saveSupportInfoComment( - @RequestParam("userId") Long userId, - @RequestBody CommentRequestDto.SupportInfoCommentDto supportInfoCommentDto){ - CommentResponseDto.SupportInfoCommentDto dto = commentService.saveSupportComment(userId, supportInfoCommentDto); - return ResponseEntity.ok(dto); - } - - - @GetMapping("/supports/comments") - public ResponseEntity> findAllBySupportInfo( - @RequestParam("supportInfoId") Long supportInfoId, - @PageableDefault(size = 20, page = 0)Pageable pageable){ - Page result = commentService.findBySupportInfoWithPaging(supportInfoId, pageable); - return ResponseEntity.ok(result); - } - - @PostMapping("/comments/delete") - public ResponseEntity deleteComment(@RequestParam("commentId") Long commentId) { - commentService.deleteComment(commentId); - return ResponseEntity.ok("ok"); - } - - - -}