mirror of
https://github.com/PeernetOfficial/core.git
synced 2026-07-22 12:47:51 +01:00
added support to filter files in the search result based on the NodeID provided
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user