Merge pull request 'added error handling when requesting to join non existing room' (#41) from bugfix/unhandled-error-when-trying-to-join-non-existing-room into develop
default-pipeline default-pipeline #187
default-pipeline default-pipeline #187
Reviewed-on: https://gitea.e5tv.hu/esoko/mapguesser/pulls/41 Reviewed-by: Pőcze Bence <bence@pocze.ch>
This commit was merged in pull request #41.
This commit is contained in:
commit
7f8c1eb291
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