GetExtends adjust

This commit is contained in:
mr
2026-04-22 09:18:08 +02:00
parent 17a45eb5d1
commit a08c9b084d

View File

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