Merged in hotfix/MAPG-110-in-place-reset-of-game (pull request #87)

Hotfix/MAPG-110 in place reset of game
This commit is contained in:
Bence Pőcze 2020-06-03 22:20:44 +00:00
commit b6f8735da8
2 changed files with 3 additions and 3 deletions

View File

@ -135,7 +135,7 @@
Core.resetGame(); Core.resetGame();
}; };
xhr.open('GET', '/game/' + mapId + '/position.json', true); xhr.open('GET', '/game/' + mapId + '/json', true);
xhr.send(); xhr.send();
}, },

View File

@ -22,7 +22,7 @@ class PositionController
$mapId = (int) $parameters['mapId']; $mapId = (int) $parameters['mapId'];
if (!isset($_SESSION['state']) || $_SESSION['state']['mapId'] !== $mapId) { if (!isset($_SESSION['state']) || $_SESSION['state']['mapId'] !== $mapId) {
$data = ['error' => 'No valid session found!']; $data = ['error' => 'no_session_found'];
return new JsonContent($data); return new JsonContent($data);
} }
@ -60,7 +60,7 @@ class PositionController
$mapId = (int) $parameters['mapId']; $mapId = (int) $parameters['mapId'];
if (!isset($_SESSION['state']) || $_SESSION['state']['mapId'] !== $mapId) { if (!isset($_SESSION['state']) || $_SESSION['state']['mapId'] !== $mapId) {
$data = ['error' => 'No valid session found!']; $data = ['error' => 'no_session_found'];
return new JsonContent($data); return new JsonContent($data);
} }