Add Config to router as Extension
This commit is contained in:
@@ -31,6 +31,7 @@ async fn router_setup() -> Result<Router> {
|
|||||||
let auth_layer = build_auth_layer(db_pool.clone(), key_val_pool);
|
let auth_layer = build_auth_layer(db_pool.clone(), key_val_pool);
|
||||||
|
|
||||||
let router = dioxus::server::router(App)
|
let router = dioxus::server::router(App)
|
||||||
|
.layer(Extension(config))
|
||||||
.layer(Extension(db_pool))
|
.layer(Extension(db_pool))
|
||||||
.layer(auth_layer);
|
.layer(auth_layer);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user