mirror of
https://github.com/meilisearch/meilisearch.git
synced 2025-07-27 08:41:00 +00:00
Return an error when calling DELETE /tasks with an empty query
This commit is contained in:
committed by
Clément Renault
parent
fbd2be2ec8
commit
f32b973945
@ -209,6 +209,9 @@ async fn delete_tasks(
|
||||
index_uid,
|
||||
uid,
|
||||
};
|
||||
if query.is_empty() {
|
||||
return Err(index_scheduler::Error::TaskDeletionWithEmptyQuery.into());
|
||||
}
|
||||
|
||||
let filtered_query = filter_out_inaccessible_indexes_from_query(&index_scheduler, &query);
|
||||
|
||||
@ -258,6 +261,7 @@ async fn get_tasks(
|
||||
Some(&req),
|
||||
);
|
||||
|
||||
// TODO: Lo: use `filter_out_inaccessible_indexes_from_query` here
|
||||
let mut filters = index_scheduler::Query::default();
|
||||
|
||||
// Then we filter on potential indexes and make sure that the search filter
|
||||
|
Reference in New Issue
Block a user