From ec625fb7b5138a0312f071784bf7cb279fe74f54 Mon Sep 17 00:00:00 2001 From: Jim Martens Date: Wed, 16 Aug 2023 22:21:53 +0200 Subject: [PATCH] Use service properties to check successful change --- .../wahlrecht/controller/v1/HealthCheckController.kt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/module-server/src/main/kotlin/de/twomartens/wahlrecht/controller/v1/HealthCheckController.kt b/module-server/src/main/kotlin/de/twomartens/wahlrecht/controller/v1/HealthCheckController.kt index 5918252..53b299e 100644 --- a/module-server/src/main/kotlin/de/twomartens/wahlrecht/controller/v1/HealthCheckController.kt +++ b/module-server/src/main/kotlin/de/twomartens/wahlrecht/controller/v1/HealthCheckController.kt @@ -1,5 +1,6 @@ package de.twomartens.wahlrecht.controller.v1 +import de.twomartens.wahlrecht.property.ServiceProperties import io.swagger.v3.oas.annotations.Hidden import org.springframework.web.bind.annotation.GetMapping import org.springframework.web.bind.annotation.RequestMapping @@ -7,11 +8,12 @@ import org.springframework.web.bind.annotation.RestController @RestController @RequestMapping(value = ["/wahlrecht/v1"]) -class HealthCheckController { +class HealthCheckController(private val properties: ServiceProperties) { + @Hidden @GetMapping("/healthCheck") fun healthCheck(message: String): String { - return message + return properties.greeting.format(message) } } \ No newline at end of file