Change the metrics route API access rights

This commit is contained in:
Clément Renault 2022-08-24 16:28:33 +02:00
parent f87ebfe477
commit 381df43be4
No known key found for this signature in database
GPG key ID: 92ADA4E935E71FA4
2 changed files with 18 additions and 8 deletions

View file

@ -282,7 +282,7 @@ pub async fn get_health() -> Result<HttpResponse, ResponseError> {
}
pub async fn get_metrics(
meilisearch: GuardedData<ActionPolicy<{ actions::STATS_GET }>, MeiliSearch>,
meilisearch: GuardedData<ActionPolicy<{ actions::METRICS_GET }>, MeiliSearch>,
) -> Result<HttpResponse, ResponseError> {
let search_rules = &meilisearch.filters().search_rules;
let response = meilisearch.get_all_stats(search_rules).await?;