From cdc9d741b3ef590e15892f8cae08b90e933e09af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EC=9A=A9=EC=88=98?= Date: Fri, 13 Sep 2024 21:28:53 +0900 Subject: [PATCH] =?UTF-8?q?Chore:=20=EA=B3=B5=EB=B0=B1=20=EB=B0=8F=20?= =?UTF-8?q?=EA=B0=9C=ED=96=89=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/LabelCategoryController.java | 33 +++---------------- 1 file changed, 5 insertions(+), 28 deletions(-) diff --git a/backend/src/main/java/com/worlabel/domain/labelcategory/controller/LabelCategoryController.java b/backend/src/main/java/com/worlabel/domain/labelcategory/controller/LabelCategoryController.java index b1eba79..17a12c5 100644 --- a/backend/src/main/java/com/worlabel/domain/labelcategory/controller/LabelCategoryController.java +++ b/backend/src/main/java/com/worlabel/domain/labelcategory/controller/LabelCategoryController.java @@ -7,13 +7,10 @@ import com.worlabel.global.annotation.CurrentUser; import com.worlabel.global.config.swagger.SwaggerApiError; import com.worlabel.global.config.swagger.SwaggerApiSuccess; import com.worlabel.global.exception.ErrorCode; -import com.worlabel.global.response.BaseResponse; -import com.worlabel.global.response.SuccessResponse; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; import lombok.RequiredArgsConstructor; import org.springframework.data.repository.query.Param; -import org.springframework.http.HttpStatus; import org.springframework.web.bind.annotation.*; import java.util.List; @@ -30,10 +27,7 @@ public class LabelCategoryController { @SwaggerApiSuccess(description = "카테고리 성공적으로 생성합니다.") @SwaggerApiError({ErrorCode.EMPTY_REQUEST_PARAMETER, ErrorCode.SERVER_ERROR}) @PostMapping - public LabelCategoryResponse createFolder( - @CurrentUser final Integer memberId, - @PathVariable("project_id") final Integer projectId, - @RequestBody final LabelCategoryRequest categoryRequest) { + public LabelCategoryResponse createFolder(@CurrentUser final Integer memberId, @PathVariable("project_id") final Integer projectId, @RequestBody final LabelCategoryRequest categoryRequest) { return categoryService.createCategory(memberId, projectId, categoryRequest); } @@ -41,11 +35,7 @@ public class LabelCategoryController { @SwaggerApiSuccess(description = "카테고리 성공적으로 조회합니다.") @SwaggerApiError({ErrorCode.EMPTY_REQUEST_PARAMETER, ErrorCode.SERVER_ERROR}) @GetMapping("/{category_id}") - public LabelCategoryResponse getCategoryById( - @CurrentUser final Integer memberId, - @PathVariable("project_id") final Integer projectId, - @PathVariable("category_id") final Integer categoryId - ) { + public LabelCategoryResponse getCategoryById(@CurrentUser final Integer memberId, @PathVariable("project_id") final Integer projectId, @PathVariable("category_id") final Integer categoryId) { return categoryService.getCategoryById(memberId, projectId, categoryId); } @@ -53,11 +43,7 @@ public class LabelCategoryController { @SwaggerApiSuccess(description = "카테고리 존재 여부를 조회합니다.") @SwaggerApiError({ErrorCode.EMPTY_REQUEST_PARAMETER, ErrorCode.SERVER_ERROR}) @GetMapping("/exist") - public boolean existByCategoryName( - @CurrentUser final Integer memberId, - @PathVariable("project_id") final Integer projectId, - @Param("categoryName") final String categoryName - ) { + public boolean existByCategoryName(@CurrentUser final Integer memberId, @PathVariable("project_id") final Integer projectId, @Param("categoryName") final String categoryName) { return categoryService.existByCategoryName(memberId, projectId, categoryName); } @@ -65,25 +51,16 @@ public class LabelCategoryController { @SwaggerApiSuccess(description = "카테고리 리스트를 성공적으로 조회합니다.") @SwaggerApiError({ErrorCode.EMPTY_REQUEST_PARAMETER, ErrorCode.SERVER_ERROR}) @GetMapping - public List getCategoryList( - @CurrentUser final Integer memberId, - @PathVariable("project_id") final Integer projectId - ) { + public List getCategoryList(@CurrentUser final Integer memberId, @PathVariable("project_id") final Integer projectId) { return categoryService.getCategoryList(memberId, projectId); } - @Operation(summary = "카테고리 삭제", description = "카테고리를 삭제합니다.") @SwaggerApiError({ErrorCode.EMPTY_REQUEST_PARAMETER, ErrorCode.SERVER_ERROR}) @SwaggerApiSuccess(description = "카테고리를 성공적으로 삭제합니다.") @DeleteMapping("/{category_id}") - public void deleteCategoryById( - @CurrentUser final Integer memberId, - @PathVariable("project_id") final Integer projectId, - @PathVariable("category_id") final Integer categoryId) { + public void deleteCategoryById(@CurrentUser final Integer memberId, @PathVariable("project_id") final Integer projectId, @PathVariable("category_id") final Integer categoryId) { categoryService.deleteCategory(memberId, projectId, categoryId); } - - }