added support to filter files in the search result based on the NodeID provided

This commit is contained in:
2023-07-01 13:02:49 +01:00
parent 187621a29e
commit 9dcfcb6b55
4 changed files with 78 additions and 65 deletions

View File

@@ -7,6 +7,7 @@ Author: Peter Kleissner
package webapi
import (
"bytes"
"sort"
"sync"
"time"
@@ -255,6 +256,10 @@ func (job *SearchJob) isFileFiltered(file *apiFile) bool {
return false
}
if job.filtersRuntime.NodeID != nil && !bytes.Equal(job.filtersRuntime.NodeID, file.NodeID) {
return false
}
return true
}