Commit 28fb8d3f authored by Zohten's avatar Zohten

control valid token

parent 6349c5d2
......@@ -18,6 +18,12 @@ class GameController extends Controller
$httpMethod=$this->request->getHttpMethod();
$uriParams=$this->request->getUriParams();
// Auth with token phase (id = 0 because not used when checking validtoken)
$authResponse = $this->authUser(-1, 'validtoken');
if($authResponse->getCode()!=200){
return $authResponse;
}
switch ($httpMethod) {
case 'GET':
// If there is a uriParams, it is the /game/{id} endpoint
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment