File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
src/main/kotlin/infrastructure/api/handlers Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -25,14 +25,18 @@ class SurgeryReportIntegrationHandler(
2525) : Handler<RoutingContext> {
2626
2727 override fun handle (routingContext : RoutingContext ) {
28- routingContext.request().body().onComplete {
29- val integration = Json .decodeFromString<SurgeryReportIntegrationDto >(it.result(). toString())
28+ routingContext.request().body().onSuccess {
29+ val integration = Json .decodeFromString<SurgeryReportIntegrationDto >(it.toString())
3030 .toSurgeryReportIntegration()
31- SurgeryReportIntegrationUseCase (integration, provider.webClient).execute().onComplete { ar ->
31+ SurgeryReportIntegrationUseCase (
32+ routingContext.pathParam(" processId" ),
33+ integration,
34+ provider.webClient,
35+ ).execute().onSuccess { result ->
3236 routingContext
3337 .response()
3438 .setStatusCode(
35- if (ar. result() ) HttpResponseStatus .OK .code() else HttpResponseStatus .BAD_REQUEST .code(),
39+ if (result) HttpResponseStatus .OK .code() else HttpResponseStatus .BAD_REQUEST .code(),
3640 ).end()
3741 }
3842 }
You can’t perform that action at this time.
0 commit comments