Fixed login error where no error message was shown, now it does #27
1
dist/api/index.php
vendored
1
dist/api/index.php
vendored
@ -405,6 +405,7 @@ $app->post("/user/login", function (Request $request, Response $response)
|
|||||||
$response->getBody()->write(json_encode(array("token" => $_SESSION["token"])));
|
$response->getBody()->write(json_encode(array("token" => $_SESSION["token"])));
|
||||||
return $response;
|
return $response;
|
||||||
}
|
}
|
||||||
|
$response->getBody()->write(json_encode(array("error" => "Unauthorised")));
|
||||||
return $response->withStatus(401);
|
return $response->withStatus(401);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -405,6 +405,7 @@ $app->post("/user/login", function (Request $request, Response $response)
|
|||||||
$response->getBody()->write(json_encode(array("token" => $_SESSION["token"])));
|
$response->getBody()->write(json_encode(array("token" => $_SESSION["token"])));
|
||||||
return $response;
|
return $response;
|
||||||
}
|
}
|
||||||
|
$response->getBody()->write(json_encode(array("error" => "Unauthorised")));
|
||||||
return $response->withStatus(401);
|
return $response->withStatus(401);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user