index_scheduler.features() is no longer fallible

This commit is contained in:
Louis Dureuil 2023-10-23 10:38:56 +02:00
parent dd619913da
commit cf8dad1ca0
No known key found for this signature in database
10 changed files with 26 additions and 44 deletions

View file

@ -19,7 +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()?;
index_scheduler.features().check_metrics()?;
let auth_filters = index_scheduler.filters();
if !auth_filters.all_indexes_authorized() {
let mut error = ResponseError::from(AuthenticationError::InvalidToken);