Add indexUid filtering on the /tasks route

This commit is contained in:
Kerollmops 2022-05-17 16:08:23 +02:00
parent 80f7d87356
commit 3684c822f1
No known key found for this signature in database
GPG key ID: 92ADA4E935E71FA4
11 changed files with 106 additions and 53 deletions

View file

@ -122,12 +122,12 @@ impl Index<'_> {
}
pub async fn get_task(&self, update_id: u64) -> (Value, StatusCode) {
let url = format!("/indexes/{}/tasks/{}", self.uid, update_id);
let url = format!("/tasks/{}", update_id);
self.service.get(url).await
}
pub async fn list_tasks(&self) -> (Value, StatusCode) {
let url = format!("/indexes/{}/tasks", self.uid);
let url = format!("/tasks?indexUid={}", self.uid);
self.service.get(url).await
}