From 976a5cedcb5f77c20e113fa102cbf80fb9a18b11 Mon Sep 17 00:00:00 2001 From: mr Date: Thu, 30 Jan 2025 14:08:47 +0100 Subject: [PATCH] adding inputs output struct based on argo naming for now --- .../collaborative_area/collaborative_area_mongo_accessor.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/models/collaborative_area/collaborative_area_mongo_accessor.go b/models/collaborative_area/collaborative_area_mongo_accessor.go index 87f1b13..8119c67 100644 --- a/models/collaborative_area/collaborative_area_mongo_accessor.go +++ b/models/collaborative_area/collaborative_area_mongo_accessor.go @@ -91,7 +91,7 @@ func filterEnrich[T utils.ShallowDBObject](arr []string, isDrafted bool, a utils "abstractobject.id": {{Operator: dbs.IN.String(), Value: arr}}, }, }, "", isDrafted) - fmt.Println(res) + fmt.Println(res, arr, isDrafted) if code == 200 { for _, r := range res { new = append(new, r.(T)) @@ -125,14 +125,14 @@ func (a *collaborativeAreaMongoAccessor) LoadOne(id string) (utils.DBObject, int func (a *collaborativeAreaMongoAccessor) LoadAll(isDrafted bool) ([]utils.ShallowDBObject, int, error) { return utils.GenericLoadAll[*CollaborativeArea](func(d utils.DBObject) utils.ShallowDBObject { - return a.enrich(d.(*CollaborativeArea), false) + return a.enrich(d.(*CollaborativeArea), isDrafted) }, isDrafted, a) } func (a *collaborativeAreaMongoAccessor) Search(filters *dbs.Filters, search string, isDrafted bool) ([]utils.ShallowDBObject, int, error) { return utils.GenericSearch[*CollaborativeArea](filters, search, (&CollaborativeArea{}).GetObjectFilters(search), func(d utils.DBObject) utils.ShallowDBObject { - return a.enrich(d.(*CollaborativeArea), false) + return a.enrich(d.(*CollaborativeArea), isDrafted) }, isDrafted, a) }