GetExtends adjust
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user