This commit is contained in:
mr 2025-01-14 08:32:15 +01:00
parent 1c32cd2d12
commit 0feab329c1

View File

@ -62,6 +62,7 @@ func (dca *resourceMongoAccessor[T]) LoadOne(id string) (utils.DBObject, int, er
d.(T).SetResourceModel(resources[0].(*resource_model.ResourceModel))
}
d.(T).SetAllowedInstances(dca.Request)
d = d.(T).Transform()
return d, 200, nil
}, dca)
}
@ -73,6 +74,7 @@ func (wfa *resourceMongoAccessor[T]) LoadAll(isDraft bool) ([]utils.ShallowDBObj
d.(T).SetResourceModel(resources[0].(*resource_model.ResourceModel))
}
d.(T).SetAllowedInstances(wfa.Request)
d = d.(T).Transform()
return d
}, isDraft, wfa)
}
@ -85,6 +87,7 @@ func (wfa *resourceMongoAccessor[T]) Search(filters *dbs.Filters, search string,
d.(T).SetResourceModel(resources[0].(*resource_model.ResourceModel))
}
d.(T).SetAllowedInstances(wfa.Request)
d = d.(T).Transform()
return d
}, isDraft, wfa)
}