Fix Docspell search pagination
This commit is contained in:
+2
-1
@@ -122,9 +122,10 @@ func (c *DocspellClient) SearchItems(ctx context.Context, query string, limit in
|
||||
all = append(all, group.Items...)
|
||||
count += len(group.Items)
|
||||
}
|
||||
if count == 0 || count < limit {
|
||||
if count == 0 {
|
||||
return all, nil
|
||||
}
|
||||
offset += count - limit
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user