Debugging Put / GET ALL
This commit is contained in:
@@ -43,10 +43,12 @@ func (wfa WorkflowExecutionMongoAccessor) LoadAll() ([]utils.ShallowDBObject, in
|
||||
wfa.Logger.Error().Msg("Could not retrieve any from db. Error: " + err.Error())
|
||||
return nil, code, err
|
||||
}
|
||||
for res_mongo.Next(mongo.MngoCtx) {
|
||||
var obj utils.AbstractObject
|
||||
res_mongo.Decode(&obj)
|
||||
objs = append(objs, &obj)
|
||||
var results []WorkflowExecution
|
||||
if err = res_mongo.All(mongo.MngoCtx, &results); err != nil {
|
||||
return nil, 404, err
|
||||
}
|
||||
for _, r := range results {
|
||||
objs = append(objs, &r)
|
||||
}
|
||||
return objs, 200, nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user