Skip to content

Commit

Permalink
Fix :: TaskController dto RequestBody 사용
Browse files Browse the repository at this point in the history
  • Loading branch information
seu1a committed Oct 22, 2024
1 parent 1c1c0f8 commit fe169ca
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -19,11 +20,9 @@ class TaskController (
) {

@PostMapping
fun createTask(dto: CreateTaskRequest): BaseResponse<Unit> {
return BaseResponse (
message = "과제 만들기 성공 !",
data = service.createTask(dto)
)
fun createTask(@RequestBody dto: CreateTaskRequest): BaseResponse<Unit> {
service.createTask(dto)
return BaseResponse (message = "과제 만들기 성공 !")
}

@GetMapping("/{workspaceId}")
Expand Down

0 comments on commit fe169ca

Please sign in to comment.