mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-03 03:47:02 +02:00
Return an error when calling DELETE /tasks with an empty query
This commit is contained in:
parent
9067148270
commit
dabc30d3d6
4 changed files with 28 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue