This commit is contained in:
mr 2024-10-23 09:55:08 +02:00
parent 158d3aacc8
commit 84deb17e37
2 changed files with 1 additions and 2 deletions

View File

@ -118,7 +118,6 @@ func (p *PeerCache) LaunchPeerExecution(peerID string, dataID string,
// exec executes the method on the peer // exec executes the method on the peer
func (p *PeerCache) exec(url string, method tools.METHOD, body map[string]interface{}, caller *tools.HTTPCaller) error { func (p *PeerCache) exec(url string, method tools.METHOD, body map[string]interface{}, caller *tools.HTTPCaller) error {
fmt.Println("exec", url, "...")
var b []byte var b []byte
var err error var err error
if method == tools.POST { // Execute the POST method if it's a POST method if method == tools.POST { // Execute the POST method if it's a POST method
@ -132,7 +131,6 @@ func (p *PeerCache) exec(url string, method tools.METHOD, body map[string]interf
} }
var m map[string]interface{} var m map[string]interface{}
json.Unmarshal(b, &m) json.Unmarshal(b, &m)
fmt.Printf("Response: %v\n", err)
if err != nil { if err != nil {
return err return err
} }

View File

@ -70,6 +70,7 @@ func (wfa *peerMongoAccessor) Search(filters *dbs.Filters, search string) ([]uti
filters = &dbs.Filters{ filters = &dbs.Filters{
Or: map[string][]dbs.Filter{ // search by name if no filters are provided Or: map[string][]dbs.Filter{ // search by name if no filters are provided
"abstractobject.name": {{Operator: dbs.LIKE.String(), Value: search}}, "abstractobject.name": {{Operator: dbs.LIKE.String(), Value: search}},
"url": {{Operator: dbs.LIKE.String(), Value: search}},
}, },
} }
} }