Fixed login error where no error message was shown, now it does #27

Merged
rodude123 merged 1 commits from login-error-fix into master 2022-11-01 14:15:32 +00:00
2 changed files with 2 additions and 0 deletions
Showing only changes of commit eeb8c5b80f - Show all commits

1
dist/api/index.php vendored
View File

@ -405,6 +405,7 @@ $app->post("/user/login", function (Request $request, Response $response)
$response->getBody()->write(json_encode(array("token" => $_SESSION["token"])));
return $response;
}
$response->getBody()->write(json_encode(array("error" => "Unauthorised")));
return $response->withStatus(401);
});

View File

@ -405,6 +405,7 @@ $app->post("/user/login", function (Request $request, Response $response)
$response->getBody()->write(json_encode(array("token" => $_SESSION["token"])));
return $response;
}
$response->getBody()->write(json_encode(array("error" => "Unauthorised")));
return $response->withStatus(401);
});