Skip to content

Commit a5cecdc

Browse files
giacomoaccursiandrea-acampora
authored andcommitted
chore: use onSuccess method instead of onComplete
1 parent 7dd7512 commit a5cecdc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/kotlin/infrastructure/api/handlers/AuthenticationHandler.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ class AuthenticationHandler(
2525
) : Handler<RoutingContext> {
2626

2727
override fun handle(routingContext: RoutingContext) {
28-
routingContext.request().body().onComplete {
29-
val user = Json.decodeFromString<UserDto>(it.result().toString()).toUser()
28+
routingContext.request().body().onSuccess {
29+
val user = Json.decodeFromString<UserDto>(it.toString()).toUser()
3030
AuthenticationUseCase(user, provider.webClient).execute().onComplete { ar ->
3131
routingContext
3232
.response()

0 commit comments

Comments
 (0)