From 737f2d21c9dab86772d3d8a167bec1096e57fef1 Mon Sep 17 00:00:00 2001 From: eunseo5343 <130284467+eunseo5343@users.noreply.github.com> Date: Thu, 18 Jul 2024 22:40:08 +0900 Subject: [PATCH 1/2] =?UTF-8?q?Fix=20[#143]=20=EC=B9=B4=ED=85=8C=EA=B3=A0?= =?UTF-8?q?=EB=A6=AC=20=EC=82=AD=EC=A0=9C=20api?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sopt/jaksim/category/api/CategoryApi.java | 34 +++++++++++++++++++ .../category/api/CategoryApiController.java | 1 + 2 files changed, 35 insertions(+) diff --git a/jaksim/src/main/java/org/sopt/jaksim/category/api/CategoryApi.java b/jaksim/src/main/java/org/sopt/jaksim/category/api/CategoryApi.java index 508804d..56edb68 100644 --- a/jaksim/src/main/java/org/sopt/jaksim/category/api/CategoryApi.java +++ b/jaksim/src/main/java/org/sopt/jaksim/category/api/CategoryApi.java @@ -129,4 +129,38 @@ ResponseEntity> retrieve(@RequestParam @DateTimeFormat(iso = Dat description = "서버 내부 오류입니다.")}) ResponseEntity> getCategoriesByUserId(); + @Operation( + summary = "카테고리 삭제 API", + description = "사용자가 생성한 카테고리를 삭제하는 API입니다.", + responses = { + @ApiResponse( + responseCode = "200", + description = "요청이 성공했습니다.", + content = @Content(schema = @Schema(implementation = BaseResponse.class))), + @ApiResponse( + responseCode = "400", + description = "잘못된 요청입니다.", + content = @Content), + @ApiResponse( + responseCode = "401", + description = "액세스 토큰이 만료되었습니다. 재발급 받아주세요.", + content = @Content), + @ApiResponse( + responseCode = "401", + description = "액세스 토큰의 값이 올바르지 않습니다.", + content = @Content), + @ApiResponse( + responseCode = "404", + description = "대상을 찾을 수 없습니다", + content = @Content), + @ApiResponse( + responseCode = "405", + description = "잘못된 HTTP method 요청입니다.", + content = @Content), + @ApiResponse( + responseCode = "500", + description = "서버 내부 오류입니다.")}) + public ResponseEntity> delete(@PathVariable("categoryId") Long categoryId); + + } diff --git a/jaksim/src/main/java/org/sopt/jaksim/category/api/CategoryApiController.java b/jaksim/src/main/java/org/sopt/jaksim/category/api/CategoryApiController.java index e576bd6..794ab43 100644 --- a/jaksim/src/main/java/org/sopt/jaksim/category/api/CategoryApiController.java +++ b/jaksim/src/main/java/org/sopt/jaksim/category/api/CategoryApiController.java @@ -51,6 +51,7 @@ public ResponseEntity> getCategoriesByUserId() { } @DeleteMapping("/categories/{categoryId}") + @Override public ResponseEntity> delete(@PathVariable("categoryId") Long categoryId) { categoryService.isExist(categoryId); categoryTaskFacade.deleteCategoryTaskAndTasks(categoryId); From 52aa1cb76c56773ea73a14ca7227c71bcefe2651 Mon Sep 17 00:00:00 2001 From: eunseo5343 <130284467+eunseo5343@users.noreply.github.com> Date: Thu, 18 Jul 2024 22:40:39 +0900 Subject: [PATCH 2/2] =?UTF-8?q?Fix=20[#143]=20=ED=8A=B9=EC=A0=95=20?= =?UTF-8?q?=ED=83=9C=EC=8A=A4=ED=81=AC=EC=9D=98=20=EB=AA=A8=EB=A6=BD?= =?UTF-8?q?=EC=84=B8=ED=8A=B8=20=EB=B6=88=EB=9F=AC=EC=98=A4=EA=B8=B0=20api?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../org/sopt/jaksim/mset/api/MsetApi.java | 36 +++++++++++++++++++ .../jaksim/mset/api/MsetApiController.java | 1 + 2 files changed, 37 insertions(+) diff --git a/jaksim/src/main/java/org/sopt/jaksim/mset/api/MsetApi.java b/jaksim/src/main/java/org/sopt/jaksim/mset/api/MsetApi.java index 40308b5..2a8695a 100644 --- a/jaksim/src/main/java/org/sopt/jaksim/mset/api/MsetApi.java +++ b/jaksim/src/main/java/org/sopt/jaksim/mset/api/MsetApi.java @@ -8,9 +8,12 @@ import io.swagger.v3.oas.annotations.tags.Tag; import org.sopt.jaksim.category.dto.CategoryMsetLinkResponse; import org.sopt.jaksim.global.common.BaseResponse; +import org.sopt.jaksim.mset.dto.MsetOfTask; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.PathVariable; +import java.util.List; + @Tag(name = "Mset 관련 API") @SecurityRequirement(name = "Authorization") public interface MsetApi { @@ -47,4 +50,37 @@ public interface MsetApi { description = "서버 내부 오류입니다.")}) ResponseEntity> getFromOtherCategory(@PathVariable("categoryId") Long categoryId); + @Operation( + summary = "특정 태스크의 모립세트 불러오기 API", + description = "특정 태스크의 모립세트를 불러오는 API입니다.", + responses = { + @ApiResponse( + responseCode = "200", + description = "요청이 성공했습니다.", + content = @Content(schema = @Schema(implementation = MsetOfTask.class))), + @ApiResponse( + responseCode = "400", + description = "잘못된 요청입니다.", + content = @Content), + @ApiResponse( + responseCode = "401", + description = "액세스 토큰이 만료되었습니다. 재발급 받아주세요.", + content = @Content), + @ApiResponse( + responseCode = "401", + description = "액세스 토큰의 값이 올바르지 않습니다.", + content = @Content), + @ApiResponse( + responseCode = "404", + description = "대상을 찾을 수 없습니다", + content = @Content), + @ApiResponse( + responseCode = "405", + description = "잘못된 HTTP method 요청입니다.", + content = @Content), + @ApiResponse( + responseCode = "500", + description = "서버 내부 오류입니다.")}) + ResponseEntity> getFromOtherTask(@PathVariable("taskId") Long taskId); + } diff --git a/jaksim/src/main/java/org/sopt/jaksim/mset/api/MsetApiController.java b/jaksim/src/main/java/org/sopt/jaksim/mset/api/MsetApiController.java index 85589e3..0b7df5e 100644 --- a/jaksim/src/main/java/org/sopt/jaksim/mset/api/MsetApiController.java +++ b/jaksim/src/main/java/org/sopt/jaksim/mset/api/MsetApiController.java @@ -35,6 +35,7 @@ public ResponseEntity> getFromOtherCategory(@PathVariable("categ } @GetMapping("/mset/tasks/{taskId}") + @Override public ResponseEntity> getFromOtherTask(@PathVariable("taskId") Long taskId) { List response = categoryMsetFacade.getFromCategory(categoryTaskFacade.getCategoryIdByCategoryTask(taskId)); return ApiResponseUtil.success(SuccessMessage.SUCCESS, response);