added error handling when requesting to join non existing room
default-pipeline default-pipeline #181

This commit is contained in:
balazs committed 2021-05-08 18:03:17 +02:00
1 parent 430b32d0c6
commit 01a4fdf5e5
2 files changed
+9

No files matched your search

+5
View File
@@ -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);