feat(api): Implemented session closed and kick event via websocket

This commit is contained in:
2025-11-26 15:53:34 +01:00
parent 576e5af87e
commit 551938bcd3
14 changed files with 253 additions and 20 deletions

View File

@@ -89,7 +89,7 @@ class IngameController @Inject()(
val game = PodManager.getGame(gameId)
val playerToKickUUID = UUID.fromString(playerToKick)
val result = Try {
game.get.leaveGame(playerToKickUUID)
game.get.leaveGame(playerToKickUUID, true)
}
if (result.isSuccess) {
Ok(Json.obj(
@@ -107,7 +107,7 @@ class IngameController @Inject()(
def leaveGame(gameId: String): Action[AnyContent] = authAction { implicit request: AuthenticatedRequest[AnyContent] =>
val game = PodManager.getGame(gameId)
val result = Try {
game.get.leaveGame(request.user.id)
game.get.leaveGame(request.user.id, false)
}
if (result.isSuccess) {
Ok(Json.obj(