From 464c8b8c1d29aabef21b34d1a69028ad2922f82f Mon Sep 17 00:00:00 2001 From: Paul-Christian Volkmer Date: Mon, 15 Jul 2024 11:59:00 +0200 Subject: refactor: use dedicated type for path param --- src/main/kotlin/dev/dnpm/etl/processor/web/HomeController.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/main/kotlin/dev') diff --git a/src/main/kotlin/dev/dnpm/etl/processor/web/HomeController.kt b/src/main/kotlin/dev/dnpm/etl/processor/web/HomeController.kt index 5419477..54920b1 100644 --- a/src/main/kotlin/dev/dnpm/etl/processor/web/HomeController.kt +++ b/src/main/kotlin/dev/dnpm/etl/processor/web/HomeController.kt @@ -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" -- cgit v1.2.3