kick forever
CI/CD / test_and_check_app (push) Successful in 2m19s
CI/CD / Publish immutable image (push) Successful in 1m16s

This commit is contained in:
2026-09-24 14:38:18 +02:00
parent b190ff719e
commit 4dfe79ce5c
22 changed files with 271 additions and 113 deletions
@@ -32,7 +32,6 @@ class RoomJoinController extends Controller
$room !== null
&& ! $room->isClosed()
&& $existingPlayer instanceof Player
&& $existingPlayer->inactive_at === null
) {
return to_route('room.show', $room);
}
@@ -113,12 +113,6 @@ class EnsureRoomParticipant
]);
}
if ($player->inactive_at !== null) {
return to_route('room.join', [
'join_code' => $room->join_code,
]);
}
$player->markAsSeen();
$request->attributes->set('currentPlayer', $player);
+1 -1
View File
@@ -48,7 +48,7 @@ class KickRoomPlayerRequest extends FormRequest
return null;
}
return $room->activePlayers()->find((int) $playerId);
return $room->players()->find((int) $playerId);
}
/**
+2 -3
View File
@@ -18,9 +18,8 @@ class DashboardRoomResource extends JsonResource
'join_code' => $this->resource->join_code,
'current_round' => $this->resource->current_round,
'players_count' => $this->resource->players_count,
'active_player_count' => $this->resource->active_player_count,
'players' => $this->resource->relationLoaded('activePlayers')
? $this->resource->activePlayers
'players' => $this->resource->relationLoaded('players')
? $this->resource->players
->map(fn ($player): array => [
'id' => $player->id,
'name' => $player->name,