diff options
Diffstat (limited to 'src/cli.rs')
| -rw-r--r-- | src/cli.rs | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -6,7 +6,7 @@ use clap::Parser; use sqlx::sqlite::{SqliteConnectOptions, SqlitePool, SqlitePoolOptions}; use tokio::net; -use crate::{channel, clock, error::BoxedError, index, login}; +use crate::{app::App, channel, clock, error::BoxedError, index, login}; pub type Result<T> = std::result::Result<T, BoxedError>; @@ -30,7 +30,7 @@ impl Args { let app = routers() .route_layer(middleware::from_fn(clock::middleware)) - .with_state(pool); + .with_state(App::from(pool)); let listener = self.listener().await?; let started_msg = started_msg(&listener)?; @@ -62,7 +62,7 @@ impl Args { } } -fn routers() -> Router<SqlitePool> { +fn routers() -> Router<App> { [channel::router(), login::router()] .into_iter() .fold(index::router(), Router::merge) |
