diff options
author | mia <mia@mia.jetzt> | 2024-05-03 18:25:03 -0700 |
---|---|---|
committer | mia <mia@mia.jetzt> | 2024-05-03 18:25:03 -0700 |
commit | c630a3d95fcba117eeeeb03a0c656ef26bea3072 (patch) | |
tree | 6e10801f20716bcd45d3bbc113a02908f05129a2 /src/server/mod.rs | |
parent | cb74c3346428d5e352b66d1f7982f77e0e8b8621 (diff) | |
download | dissociate-c630a3d95fcba117eeeeb03a0c656ef26bea3072.tar.gz dissociate-c630a3d95fcba117eeeeb03a0c656ef26bea3072.zip |
refactor scope access endpoints v0.3.0
Diffstat (limited to 'src/server/mod.rs')
-rw-r--r-- | src/server/mod.rs | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/src/server/mod.rs b/src/server/mod.rs index a583f85..b6dd451 100644 --- a/src/server/mod.rs +++ b/src/server/mod.rs @@ -1,8 +1,7 @@ +mod account; mod admin; mod config; -mod falx; mod login; -mod panel; mod store; use std::{future::IntoFuture, path::PathBuf, sync::Arc}; @@ -42,12 +41,10 @@ pub async fn serve() -> eyre::Result<()> { let app = Router::new() .pipe(login::bind) - .pipe(falx::bind) - .pipe(panel::bind) + .pipe(account::bind) .with_state(ApiState { store, cookie_domain: CookieDomain(config.cookie_domain), - web_base: WebBase(config.web_base), handoffs: Handoffs(Arc::new(config.handoffs)), }) .fallback(get(|| async { @@ -73,7 +70,6 @@ pub async fn serve() -> eyre::Result<()> { struct ApiState { pub store: Store, pub cookie_domain: CookieDomain, - pub web_base: WebBase, pub handoffs: Handoffs, } @@ -81,9 +77,6 @@ struct ApiState { struct CookieDomain(Option<String>); #[derive(Clone)] -struct WebBase(String); - -#[derive(Clone)] struct Handoffs(Arc<HashSet<String>>); fn render_html(head: PreEscaped<impl AsRef<str>>, body: PreEscaped<impl AsRef<str>>) -> Response { |