added error handling when requesting to join non existing room
default-pipeline default-pipeline #181
default-pipeline default-pipeline #181
This commit is contained in:
1 parent
430b32d0c6
commit
01a4fdf5e5
2 files changed
+9
No files matched your search
@@ -114,6 +114,11 @@ class GameController
|
||||
}
|
||||
|
||||
$room = $this->multiRoomRepository->getByRoomId($roomId);
|
||||
|
||||
if(!isset($room)) {
|
||||
return new JsonContent(['error' => 'game_not_found']);
|
||||
}
|
||||
|
||||
$state = $room->getStateArray();
|
||||
$map = $this->mapRepository->getById($state['mapId']);
|
||||
$token = $this->getMultiToken($roomId);
|
||||
|
||||
Reference in new issue
Block a user