feat: ctx resolver

This commit is contained in:
Sandro Eiler 2023-10-15 22:30:01 +02:00
parent a38438a700
commit 8843134aa6
5 changed files with 71 additions and 36 deletions

View file

@ -37,6 +37,7 @@ async fn main() -> Result<()>{
.merge(web::routes_login::routes())
.nest("/api", routes_apis)
.layer(middleware::map_response(main_response_mapper))
.layer(middleware::from_fn_with_state(mc.clone(), web::mw_auth::mw_ctx_resolver))
.layer(CookieManagerLayer::new()) // must be above? the auth routes
// TODO: continue video at 22:15
.fallback_service(routes_static());