From bb3e4dfd4096e6d8b3fabb88b62af381c07a8d4e Mon Sep 17 00:00:00 2001 From: Philippe Loctaux
Date: Sun, 5 Mar 2023 23:34:06 +0100
Subject: [PATCH] ezidam: minor stuff
---
crates/ezidam/Cargo.toml | 3 +++
crates/ezidam/src/page.rs | 8 ++++----
crates/ezidam/src/routes.rs | 9 +++++++++
3 files changed, 16 insertions(+), 4 deletions(-)
diff --git a/crates/ezidam/Cargo.toml b/crates/ezidam/Cargo.toml
index 519cf49..89233f1 100644
--- a/crates/ezidam/Cargo.toml
+++ b/crates/ezidam/Cargo.toml
@@ -13,3 +13,6 @@ erased-serde = "0.3"
# local crates
database_pool = { path = "../database_pool" }
settings = { path = "../settings" }
+users = { path = "../users" }
+id = { path = "../id" }
+hash = { path = "../hash" }
diff --git a/crates/ezidam/src/page.rs b/crates/ezidam/src/page.rs
index f0b386c..90b7d21 100644
--- a/crates/ezidam/src/page.rs
+++ b/crates/ezidam/src/page.rs
@@ -7,7 +7,7 @@ use erased_serde::Serialize;
pub enum Page {
Error(Error),
- Setup(),
+ Setup,
Homepage(Homepage),
}
@@ -16,7 +16,7 @@ impl Page {
fn template_name(&self) -> &'static str {
match self {
Page::Error(_) => "error",
- Page::Setup() => "setup",
+ Page::Setup => "setup",
Page::Homepage(_) => "homepage",
}
}
@@ -25,7 +25,7 @@ impl Page {
fn page_title(&self) -> &'static str {
match self {
Page::Error(_) => "Error",
- Page::Setup() => "Setup",
+ Page::Setup => "Setup",
Page::Homepage(_) => "Home",
}
}
@@ -34,7 +34,7 @@ impl Page {
fn content(self) -> Box