Skip to content

Commit

Permalink
⚡️ :: @ResponseStatus 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
jeongho1209 committed Mar 22, 2023
1 parent 20bea2c commit 8c6e642
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -242,6 +242,7 @@ class AdminWebAdapter(
return adminApi.getStudentStatusListByGradeAndClassNum(grade, classNum)
}

@ResponseStatus(HttpStatus.CREATED)
@PostMapping("/type")
fun saveTypeByLocalDate(
@RequestParam
Expand All @@ -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)
}
}

0 comments on commit 8c6e642

Please sign in to comment.