From 8d47d2d0189331a84d4bf2c8cb39f2e0c35ad434 Mon Sep 17 00:00:00 2001 From: Tamo Date: Thu, 23 Feb 2023 13:15:51 +0100 Subject: [PATCH] update the auth api after the rebase --- meilisearch/src/routes/metrics.rs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/meilisearch/src/routes/metrics.rs b/meilisearch/src/routes/metrics.rs index d0d53e3ec..a06791b9e 100644 --- a/meilisearch/src/routes/metrics.rs +++ b/meilisearch/src/routes/metrics.rs @@ -2,7 +2,7 @@ use actix_web::http::header; use actix_web::web::{self, Data}; use actix_web::HttpResponse; use index_scheduler::IndexScheduler; -use meilisearch_auth::AuthController; +use meilisearch_auth::{AuthController, AuthFilter}; use meilisearch_types::error::ResponseError; use meilisearch_types::keys::actions; use prometheus::{Encoder, TextEncoder}; @@ -19,9 +19,11 @@ pub async fn get_metrics( index_scheduler: GuardedData, Data>, auth_controller: GuardedData, AuthController>, ) -> Result { - let search_rules = &index_scheduler.filters().search_rules; - let response = - create_all_stats((*index_scheduler).clone(), (*auth_controller).clone(), search_rules)?; + let response = create_all_stats( + (*index_scheduler).clone(), + (*auth_controller).clone(), + &AuthFilter::default(), + )?; crate::metrics::MEILISEARCH_DB_SIZE_BYTES.set(response.database_size as i64); crate::metrics::MEILISEARCH_INDEX_COUNT.set(response.indexes.len() as i64);