Make Sytest happy again

This commit is contained in:
Till Faelligen 2022-09-16 10:50:46 +02:00
parent 91c82c5198
commit 8f23d0e69b
No known key found for this signature in database
GPG key ID: 3DF82D8AB9211D4E

View file

@ -222,6 +222,10 @@ func Search(req *http.Request, device *api.Device, syncDB storage.Database, fts
if int(result.Total) > nextBatch+len(results) {
nb := strconv.Itoa(len(results) + nextBatch)
nextBatchResult = &nb
} else if int(result.Total) == nextBatch+len(results) {
// Sytest expects a next_batch even if we don't actually have any more results
nb := ""
nextBatchResult = &nb
}
res := SearchResponse{