corpconfig
This commit is contained in:
parent
dc665a80f7
commit
48f1c1d4db
|
@ -68,10 +68,12 @@ func (s *StaffUser) List(sess *session.AdminSession, req *api.StaffListReq) (int
|
||||||
}
|
}
|
||||||
|
|
||||||
// config
|
// config
|
||||||
var staffConfig map[string]interface{}
|
staffConfig := make(map[string]interface{})
|
||||||
|
corpConfig := make(map[string]interface{})
|
||||||
|
json.Unmarshal([]byte(goutil.EncodeJSON(corpStaffConfig)), &corpConfig)
|
||||||
json.Unmarshal([]byte(st.Config), &staffConfig)
|
json.Unmarshal([]byte(st.Config), &staffConfig)
|
||||||
config := make([]map[string]interface{}, 0)
|
config := make([]map[string]interface{}, 0)
|
||||||
for _, kv := range corpStaffConfig {
|
for _, kv := range corpConfig {
|
||||||
obj := cast.ToStringMap(kv)
|
obj := cast.ToStringMap(kv)
|
||||||
obj["value"] = cast.ToString(staffConfig[cast.ToString(obj["key"])])
|
obj["value"] = cast.ToString(staffConfig[cast.ToString(obj["key"])])
|
||||||
config = append(config, obj)
|
config = append(config, obj)
|
||||||
|
|
Loading…
Reference in New Issue