diff --git a/entrypoint.go b/entrypoint.go index b74b1f3..4dc0ec5 100644 --- a/entrypoint.go +++ b/entrypoint.go @@ -196,11 +196,11 @@ type Claims struct { Session SessionClaims `json:"session"` } -func GetExtends(objs []utils.ShallowDBObject, extends map[string][]tools.DataType) []map[string]interface{} { +func GetExtends(objs []utils.ShallowDBObject, typ ...string) []map[string]interface{} { cache := map[tools.DataType]map[string]interface{}{} m := []map[string]interface{}{} for _, obj := range objs { - m = append(m, GetExtend(obj, extends, cache)) + m = append(m, GetExtend(obj, obj.Extend(typ...), cache)) } return m }