aboutsummaryrefslogtreecommitdiff
path: root/src/routes.rs
diff options
context:
space:
mode:
authorJoris2021-02-13 09:50:42 +0100
committerJoris2021-02-13 09:50:42 +0100
commit6f7c47a33caae84e2f99ad3bfe61a4bd0176bd1a (patch)
tree87cc7483e84d0b2d15bc9b4a433617d48cf1548b /src/routes.rs
parentc00d85d2fc5a50febdc01364e5852bf4668fe201 (diff)
downloadbudget-6f7c47a33caae84e2f99ad3bfe61a4bd0176bd1a.tar.gz
budget-6f7c47a33caae84e2f99ad3bfe61a4bd0176bd1a.tar.bz2
budget-6f7c47a33caae84e2f99ad3bfe61a4bd0176bd1a.zip
Add status page
Diffstat (limited to 'src/routes.rs')
-rw-r--r--src/routes.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/routes.rs b/src/routes.rs
index 3d76ab1..982e5ef 100644
--- a/src/routes.rs
+++ b/src/routes.rs
@@ -25,6 +25,8 @@ pub async fn routes(
let path = &uri.path().split('/').collect::<Vec<&str>>()[1..];
let response = match (method, path) {
+ (&Method::HEAD, ["status"]) => controller::utils::ok(),
+ (&Method::GET, ["status"]) => controller::utils::text("ok".to_string()),
(&Method::GET, ["login"]) => {
controller::login::page(&assets, &templates, None).await
}