From 8c6e642863185fbd4d1769fa0b13ef8f486262b8 Mon Sep 17 00:00:00 2001 From: jungho1209 Date: Wed, 22 Mar 2023 22:38:33 +0900 Subject: [PATCH] =?UTF-8?q?=E2=9A=A1=EF=B8=8F=20::=20@ResponseStatus=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../domain/admin/presentation/AdminWebAdapter.kt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pick-infrastructure/src/main/kotlin/com/pickdsm/pickserverspring/domain/admin/presentation/AdminWebAdapter.kt b/pick-infrastructure/src/main/kotlin/com/pickdsm/pickserverspring/domain/admin/presentation/AdminWebAdapter.kt index 8aa7a993..0415a362 100644 --- a/pick-infrastructure/src/main/kotlin/com/pickdsm/pickserverspring/domain/admin/presentation/AdminWebAdapter.kt +++ b/pick-infrastructure/src/main/kotlin/com/pickdsm/pickserverspring/domain/admin/presentation/AdminWebAdapter.kt @@ -44,7 +44,7 @@ import org.springframework.web.bind.annotation.RequestParam import org.springframework.web.bind.annotation.ResponseStatus import org.springframework.web.bind.annotation.RestController import java.time.LocalDate -import java.util.* +import java.util.UUID import javax.validation.Valid @RequestMapping("/admin") @@ -242,6 +242,7 @@ class AdminWebAdapter( return adminApi.getStudentStatusListByGradeAndClassNum(grade, classNum) } + @ResponseStatus(HttpStatus.CREATED) @PostMapping("/type") fun saveTypeByLocalDate( @RequestParam @@ -253,16 +254,15 @@ class AdminWebAdapter( adminApi.saveType(date, type) } - @PatchMapping("/type/{type-id}") + @ResponseStatus(HttpStatus.NO_CONTENT) + @PatchMapping("/type") fun updateType( - @PathVariable("type-id") - typeId: UUID, @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") date: LocalDate, @RequestParam type: DirectorType, ) { - adminApi.updateType(typeId, date, type) + adminApi.updateType(date, type) } }