Debugging Put / GET ALL

This commit is contained in:
mr
2024-07-24 08:35:41 +02:00
parent b775298bb0
commit bde70dec9b
8 changed files with 46 additions and 29 deletions

View File

@@ -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
}