Skip to content

Commit 6ded71d

Browse files
committed
Fix merge conflicts
2 parents 1a184ae + 05f1d5e commit 6ded71d

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

src/errors.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -156,9 +156,12 @@ pub enum ErrorCode {
156156
InvalidApiKeyIndexes,
157157
InvalidApiKeyExpiresAt,
158158
ApiKeyNotFound,
159-
InvalidTaskUid,
160-
InvalidTaskDate,
161-
MissingTaskFilter,
159+
InvalidTaskTypesFilter,
160+
InvalidTaskStatusesFilter,
161+
InvalidTaskCanceledByFilter,
162+
InvalidTaskUidsFilter,
163+
InvalidTaskDateFilter,
164+
MissingTaskFilters,
162165

163166
/// That's unexpected. Please open a GitHub issue after ensuring you are
164167
/// using the supported version of the Meilisearch server.

src/tasks.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,7 @@ pub struct TasksQuery<'a, T> {
427427
#[serde(skip_serializing_if = "Option::is_none")]
428428
statuses: Option<Vec<&'a str>>,
429429
// Types array to only retrieve the tasks with these [TaskType].
430-
#[serde(skip_serializing_if = "Option::is_none", rename = "type")]
430+
#[serde(skip_serializing_if = "Option::is_none", rename = "types")]
431431
task_types: Option<Vec<&'a str>>,
432432
// Uids of the tasks to retrieve
433433
#[serde(skip_serializing_if = "Option::is_none")]
@@ -775,7 +775,7 @@ mod test {
775775
let mock_server_url = &mockito::server_url();
776776
let client = Client::new(mock_server_url, "masterKey");
777777
let path =
778-
"/tasks?indexUid=movies,test&status=equeued&type=documentDeletion&uid=1&limit=0&from=1";
778+
"/tasks?indexUids=movies,test&statuses=equeued&types=documentDeletion&uids=1&limit=0&from=1";
779779

780780
let mock_res = mock("GET", path).with_status(200).create();
781781

@@ -861,7 +861,7 @@ mod test {
861861
async fn test_get_tasks_on_struct_with_params() -> Result<(), Error> {
862862
let mock_server_url = &mockito::server_url();
863863
let client = Client::new(mock_server_url, "masterKey");
864-
let path = "/tasks?indexUid=movies,test&status=equeued&type=documentDeletion";
864+
let path = "/tasks?indexUids=movies,test&statuses=equeued&types=documentDeletion";
865865

866866
let mock_res = mock("GET", path).with_status(200).create();
867867

@@ -879,7 +879,7 @@ mod test {
879879
}
880880

881881
#[meilisearch_test]
882-
async fn test_get_tasks_with_none_existant_index_uid(client: Client) -> Result<(), Error> {
882+
async fn test_get_tasks_with_none_existant_index_uids(client: Client) -> Result<(), Error> {
883883
let mut query = TasksSearchQuery::new(&client);
884884
query.with_index_uids(["no_name"]);
885885
let tasks = client.get_tasks_with(&query).await.unwrap();

0 commit comments

Comments
 (0)