1
0
mirror of https://github.com/pcvolkmer/etl-processor.git synced 2025-07-04 07:22:55 +00:00

refactor: use dedicated type for path param

This commit is contained in:
2024-07-15 11:59:00 +02:00
parent 3f1bb4f4e2
commit 464c8b8c1d
2 changed files with 36 additions and 3 deletions

View File

@ -53,12 +53,12 @@ class HomeController(
@GetMapping(path = ["patient/{patientPseudonym}"])
fun byPatient(
@PathVariable patientPseudonym: String,
@PathVariable patientPseudonym: PatientPseudonym,
@PageableDefault(page = 0, size = 20, sort = ["processedAt"], direction = Sort.Direction.DESC) pageable: Pageable,
model: Model
): String {
val requests = requestService.findRequestByPatientId(PatientPseudonym(patientPseudonym), pageable)
model.addAttribute("patientPseudonym", patientPseudonym)
val requests = requestService.findRequestByPatientId(patientPseudonym, pageable)
model.addAttribute("patientPseudonym", patientPseudonym.value)
model.addAttribute("requests", requests)
return "index"