MAPG-110 make error response more for machines

This commit is contained in:
Bence Pőcze 2020-06-04 00:13:57 +02:00
parent af52ac3787
commit 6a9f7eddc1

View File

@ -17,7 +17,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);
} }
@ -55,7 +55,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);
} }