diff --git a/public/static/js/game.js b/public/static/js/game.js index e302a86..789ba2c 100644 --- a/public/static/js/game.js +++ b/public/static/js/game.js @@ -135,7 +135,7 @@ Core.resetGame(); }; - xhr.open('GET', '/game/' + mapId + '/position.json', true); + xhr.open('GET', '/game/' + mapId + '/json', true); xhr.send(); }, diff --git a/src/Controller/PositionController.php b/src/Controller/PositionController.php index c8fa35a..1564730 100644 --- a/src/Controller/PositionController.php +++ b/src/Controller/PositionController.php @@ -22,7 +22,7 @@ class PositionController $mapId = (int) $parameters['mapId']; if (!isset($_SESSION['state']) || $_SESSION['state']['mapId'] !== $mapId) { - $data = ['error' => 'No valid session found!']; + $data = ['error' => 'no_session_found']; return new JsonContent($data); } @@ -60,7 +60,7 @@ class PositionController $mapId = (int) $parameters['mapId']; if (!isset($_SESSION['state']) || $_SESSION['state']['mapId'] !== $mapId) { - $data = ['error' => 'No valid session found!']; + $data = ['error' => 'no_session_found']; return new JsonContent($data); }