Skip to content

Commit fd8cb21

Browse files
committed
Send name change event after responding to http call
1 parent 1df0678 commit fd8cb21

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

server/src/main/kotlin/UserRoute.kt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@ fun Route.userRoute() {
1616
val (newName) = call.receive<UserUpdateRequest>()
1717
writeStats(stats.updateName(userId, newName))
1818

19-
broadcastEvent(UpdateNameEvent(userId, newName))
20-
2119
call.respond(HttpStatusCode.Accepted, createToken(newName, userId))
20+
broadcastEvent(UpdateNameEvent(userId, newName))
2221
}
2322
}

0 commit comments

Comments
 (0)