add error 401 and 403 on error page
continuous-integration/drone/push Build is passing Details

pull/10/head
Vivien DUFOUR 1 year ago
parent b6d8ae551c
commit 9f902c431a

@ -44,8 +44,7 @@ $router->map("POST", "/submit-twig", fn() => $sampleFormController->submitFormTw
$match = $router->match();
if ($match == null) {
$error = "404";
$errorController->displayError($error);
$errorController->displayError("404");
http_response_code(404);
exit(1);
}

@ -20,6 +20,10 @@
{% if error == "404" %}
<h2>Erreur 404 : cette page n'existe pas</h2>
{% elseif error == "401" %}
<h2>Erreur 401 : vous devez vous authentifier afin d'accèder à cette page</h2>
{% elseif error == "403" %}
<h2>Erreur 403 : vous n'avez pas les autorisations nécessaires pour accèder à cette page</h2>
{% endif %}

Loading…
Cancel
Save