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 { match self { Page::Error(error) => Box::new(error), - Page::Setup() => Box::new(()), + Page::Setup => Box::new(()), Page::Homepage(homepage) => Box::new(homepage), } } diff --git a/crates/ezidam/src/routes.rs b/crates/ezidam/src/routes.rs index 5dd17cf..2888439 100644 --- a/crates/ezidam/src/routes.rs +++ b/crates/ezidam/src/routes.rs @@ -6,7 +6,16 @@ pub(self) mod prelude { pub use crate::database::Database; pub use crate::error::Error; pub use crate::file_from_bytes::FileFromBytes; + pub use crate::guards::*; pub use crate::page::Page; + pub use hash::Password; + pub use id::UserID; + pub use rocket::form::Form; + pub use rocket::response::Redirect; + pub use rocket::tokio::task; + pub use rocket::FromForm; + pub use rocket::{routes, uri, Either, Route}; + pub use rocket_db_pools::sqlx::Acquire; pub use rocket_db_pools::Connection; pub type Result = std::result::Result;