mirror of
https://github.com/meilisearch/meilisearch.git
synced 2025-02-17 08:10:14 +08:00
Merge #3068
3068: Prepend question mark to the `originalFilters` of the task deletion and cancelation r=irevoire a=Kerollmops This pull request fixes #3064 by prepending [the HTTP query question mark](https://en.wikipedia.org/wiki/Question_mark#Computing) to the `originalFilters` of the task deletion and cancelation. Co-authored-by: Kerollmops <clement@meilisearch.com>
This commit is contained in:
commit
f908ae2ef4
@ -485,7 +485,7 @@ async fn cancel_tasks(
|
||||
&index_scheduler.filters().search_rules.authorized_indexes(),
|
||||
)?;
|
||||
let task_cancelation =
|
||||
KindWithContent::TaskCancelation { query: req.query_string().to_string(), tasks };
|
||||
KindWithContent::TaskCancelation { query: format!("?{}", req.query_string()), tasks };
|
||||
|
||||
let task = task::spawn_blocking(move || index_scheduler.register(task_cancelation)).await??;
|
||||
let task: SummarizedTaskView = task.into();
|
||||
@ -537,7 +537,7 @@ async fn delete_tasks(
|
||||
&index_scheduler.filters().search_rules.authorized_indexes(),
|
||||
)?;
|
||||
let task_deletion =
|
||||
KindWithContent::TaskDeletion { query: req.query_string().to_string(), tasks };
|
||||
KindWithContent::TaskDeletion { query: format!("?{}", req.query_string()), tasks };
|
||||
|
||||
let task = task::spawn_blocking(move || index_scheduler.register(task_deletion)).await??;
|
||||
let task: SummarizedTaskView = task.into();
|
||||
|
@ -929,7 +929,7 @@ async fn test_summarized_task_cancelation() {
|
||||
"details": {
|
||||
"matchedTasks": 1,
|
||||
"canceledTasks": 0,
|
||||
"originalFilters": "uids=0"
|
||||
"originalFilters": "?uids=0"
|
||||
},
|
||||
"error": null,
|
||||
"duration": "[duration]",
|
||||
@ -962,7 +962,7 @@ async fn test_summarized_task_deletion() {
|
||||
"details": {
|
||||
"matchedTasks": 1,
|
||||
"deletedTasks": 1,
|
||||
"originalFilters": "uids=0"
|
||||
"originalFilters": "?uids=0"
|
||||
},
|
||||
"error": null,
|
||||
"duration": "[duration]",
|
||||
|
Loading…
x
Reference in New Issue
Block a user