|
|
@@ -62,7 +62,7 @@ $app->get('/logout', function (Request $request, Response $response, array $args |
|
|
|
addNavbar($response); |
|
|
|
$response->getBody()->write('Logged out'); |
|
|
|
addFooter($response); |
|
|
|
return $response; |
|
|
|
return $response->withHeader('Location', '/')->withStatus(302); |
|
|
|
}); |
|
|
|
|
|
|
|
$app->map(['GET', 'POST'], '/login', function (Request $request, Response $response, array $args) { |
|
|
@@ -83,6 +83,7 @@ $app->map(['GET', 'POST'], '/login', function (Request $request, Response $respo |
|
|
|
addNavbar($response); |
|
|
|
$response->getBody()->write('Logged in'); |
|
|
|
addFooter($response); |
|
|
|
return $response->withHeader('Location', '/')->withStatus(302); |
|
|
|
} else { |
|
|
|
$response->getBody()->write('Username and/or password incorrect'); |
|
|
|
} |