,
) {
if let Ok(stats) =
- create_all_stats(index_scheduler.into(), auth_controller, &AuthFilter::default())
+ create_all_stats(index_scheduler.into(), auth_controller.into(), &AuthFilter::default())
{
// Replace the version number with the prototype name if any.
let version = if let Some(prototype) = crate::prototype_name() {
diff --git a/meilisearch/src/extractors/authentication/mod.rs b/meilisearch/src/extractors/authentication/mod.rs
index 6373d6a29..007e2be40 100644
--- a/meilisearch/src/extractors/authentication/mod.rs
+++ b/meilisearch/src/extractors/authentication/mod.rs
@@ -4,6 +4,7 @@ use std::marker::PhantomData;
use std::ops::Deref;
use std::pin::Pin;
+use actix_web::web::Data;
use actix_web::FromRequest;
pub use error::AuthenticationError;
use futures::future::err;
@@ -23,7 +24,7 @@ impl GuardedData
{
}
async fn auth_bearer(
- auth: AuthController,
+ auth: Data,
token: String,
index: Option,
data: Option,
@@ -43,7 +44,7 @@ impl GuardedData
{
}
}
- async fn auth_token(auth: AuthController, data: Option) -> Result
+ async fn auth_token(auth: Data, data: Option) -> Result
where
P: Policy + 'static,
{
@@ -60,7 +61,7 @@ impl GuardedData
{
}
async fn authenticate(
- auth: AuthController,
+ auth: Data,
token: String,
index: Option,
) -> Result