mirror of
https://github.com/ericasch6/scrum-poker-internal.git
synced 2026-10-13 22:12:10 +00:00
kick forever
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ class KickRoomPlayerRequest extends FormRequest
|
||||
return null;
|
||||
}
|
||||
|
||||
return $room->activePlayers()->find((int) $playerId);
|
||||
return $room->players()->find((int) $playerId);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user