COMPLEX SEARCH
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package workflow_execution
|
||||
|
||||
import (
|
||||
"cloud.o-forge.io/core/oc-lib/dbs"
|
||||
"cloud.o-forge.io/core/oc-lib/dbs/mongo"
|
||||
"cloud.o-forge.io/core/oc-lib/models/utils"
|
||||
)
|
||||
@@ -57,12 +58,9 @@ func (wfa workflowExecutionMongoAccessor) LoadAll() ([]utils.ShallowDBObject, in
|
||||
return objs, 200, nil
|
||||
}
|
||||
|
||||
func (wfa *workflowExecutionMongoAccessor) Search(word string, options ...string) ([]utils.ShallowDBObject, int, error) {
|
||||
func (wfa *workflowExecutionMongoAccessor) Search(filters *dbs.Filters, search string) ([]utils.ShallowDBObject, int, error) {
|
||||
objs := []utils.ShallowDBObject{}
|
||||
if len(options) == 0 {
|
||||
options = []string{}
|
||||
}
|
||||
res_mongo, code, err := mongo.MONGOService.Search(word, options, wfa.GetType())
|
||||
res_mongo, code, err := mongo.MONGOService.Search(dbs.Filters{}, wfa.GetType())
|
||||
if err != nil {
|
||||
wfa.Logger.Error().Msg("Could not store to db. Error: " + err.Error())
|
||||
return nil, code, err
|
||||
|
Reference in New Issue
Block a user