.service(
web::scope("/admin")
.app_data(admin_data.clone()) // admin state // maybe divide it into each configuration level
.configure(routes::api_admin_login_config)
.configure(routes::api_admin_users_config)
.configure(routes::api_admin_users_id_config),
)
However, .wrap(from_fn(auth_jwt::mw_admin_auth_jwt)) can't work here though it works using actix_web::web.
Error message says,
the trait bound `apistos::web::Resource<actix_web::Resource<impl ServiceFactory<ServiceRequest, Config = (), Response = ServiceResponse<impl MessageBody>, Error = actix_web::Error, InitError = ()>>>: apistos::internal::definition_holder::DefinitionHolder` is not satisfied
the trait `apistos::internal::definition_holder::DefinitionHolder` is implemented for `apistos::web::Resource`
I need to set warp() with middleware at each resource but I don't know how.
I'm using apistos with actix-web.
Part of my service settings are using configure()
Part of configuration is
However,
.wrap(from_fn(auth_jwt::mw_admin_auth_jwt))
can't work here though it works using actix_web::web. Error message says,I need to set warp() with middleware at each resource but I don't know how.