Skip to content

Commit

Permalink
Merge branch 'main' into bump-meilisearch-v1.13
Browse files Browse the repository at this point in the history
  • Loading branch information
Strift authored Feb 18, 2025
2 parents e45f65d + 40ea18f commit 37714fa
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 0 deletions.
4 changes: 4 additions & 0 deletions index_task.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ func (i *index) GetTasksWithContext(ctx context.Context, param *TasksQuery) (*Ta
} else {
req.withQueryParams["indexUids"] = i.uid
}

if param.Reverse {
req.withQueryParams["reverse"] = "true"
}
}
if err := i.client.executeRequest(ctx, req); err != nil {
return nil, err
Expand Down
1 change: 1 addition & 0 deletions index_task_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ func TestIndex_GetTasks(t *testing.T) {
From: 0,
Statuses: []TaskStatus{TaskStatusSucceeded},
Types: []TaskType{TaskTypeDocumentAdditionOrUpdate},
Reverse: true,
},
},
},
Expand Down
1 change: 1 addition & 0 deletions types.go
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,7 @@ type TasksQuery struct {
AfterStartedAt time.Time
BeforeFinishedAt time.Time
AfterFinishedAt time.Time
Reverse bool
}

// CancelTasksQuery is a list of filter available to send as query parameters
Expand Down
7 changes: 7 additions & 0 deletions types_easyjson.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 37714fa

Please sign in to comment.