mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-04 20:37:15 +02:00
Errors when GETting metrics without the feature gate
This commit is contained in:
parent
6196a53668
commit
cca6e47ec1
3 changed files with 4 additions and 6 deletions
|
@ -19,6 +19,7 @@ pub async fn get_metrics(
|
|||
index_scheduler: GuardedData<ActionPolicy<{ actions::METRICS_GET }>, Data<IndexScheduler>>,
|
||||
auth_controller: Data<AuthController>,
|
||||
) -> Result<HttpResponse, ResponseError> {
|
||||
index_scheduler.features()?.check_metrics()?;
|
||||
let auth_filters = index_scheduler.filters();
|
||||
if !auth_filters.all_indexes_authorized() {
|
||||
let mut error = ResponseError::from(AuthenticationError::InvalidToken);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue