From 1c1c0f8e6543875b9f2a6ade59bf0c6ffa6435bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=9D=B4=EC=8A=AC=EC=95=84?= Date: Wed, 23 Oct 2024 08:41:07 +0900 Subject: [PATCH 1/2] =?UTF-8?q?Fix=20::=20CreateTaskRequest=20=EC=95=A0?= =?UTF-8?q?=EB=85=B8=ED=85=8C=EC=9D=B4=EC=85=98=20=ED=98=95=EC=8B=9D=20?= =?UTF-8?q?=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../presentation/dto/request/CreateTaskRequest.kt | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/main/kotlin/com/seugi/api/domain/task/presentation/dto/request/CreateTaskRequest.kt b/src/main/kotlin/com/seugi/api/domain/task/presentation/dto/request/CreateTaskRequest.kt index 3745a7ee8..669709fbe 100644 --- a/src/main/kotlin/com/seugi/api/domain/task/presentation/dto/request/CreateTaskRequest.kt +++ b/src/main/kotlin/com/seugi/api/domain/task/presentation/dto/request/CreateTaskRequest.kt @@ -5,9 +5,16 @@ import java.time.LocalDateTime class CreateTaskRequest ( - @JsonProperty("workspaceId") val workspaceId: String, - @JsonProperty("title") val title: String, - @JsonProperty("description") val description: String?, - @JsonProperty("dueDate") val dueDate: LocalDateTime? + @JsonProperty("workspaceId") + val workspaceId: String, + + @JsonProperty("title") + val title: String, + + @JsonProperty("description") + val description: String?, + + @JsonProperty("dueDate") + val dueDate: LocalDateTime? ) \ No newline at end of file From fe169ca4b8eb998eb6bb3e29a6033f7fadddaef9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=9D=B4=EC=8A=AC=EC=95=84?= Date: Wed, 23 Oct 2024 08:41:48 +0900 Subject: [PATCH 2/2] =?UTF-8?q?Fix=20::=20TaskController=20dto=20RequestBo?= =?UTF-8?q?dy=20=EC=82=AC=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../seugi/api/domain/task/presentation/TaskController.kt | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/main/kotlin/com/seugi/api/domain/task/presentation/TaskController.kt b/src/main/kotlin/com/seugi/api/domain/task/presentation/TaskController.kt index 5e15af664..2e3ecfd04 100644 --- a/src/main/kotlin/com/seugi/api/domain/task/presentation/TaskController.kt +++ b/src/main/kotlin/com/seugi/api/domain/task/presentation/TaskController.kt @@ -9,6 +9,7 @@ import com.seugi.api.global.response.BaseResponse import org.springframework.web.bind.annotation.GetMapping import org.springframework.web.bind.annotation.PathVariable import org.springframework.web.bind.annotation.PostMapping +import org.springframework.web.bind.annotation.RequestBody import org.springframework.web.bind.annotation.RequestMapping import org.springframework.web.bind.annotation.RestController @@ -19,11 +20,9 @@ class TaskController ( ) { @PostMapping - fun createTask(dto: CreateTaskRequest): BaseResponse { - return BaseResponse ( - message = "과제 만들기 성공 !", - data = service.createTask(dto) - ) + fun createTask(@RequestBody dto: CreateTaskRequest): BaseResponse { + service.createTask(dto) + return BaseResponse (message = "과제 만들기 성공 !") } @GetMapping("/{workspaceId}")