1
This commit is contained in:
parent
2b44cacbc0
commit
762c589b75
@ -203,8 +203,21 @@ func (this *RiskMgr) __opsDump(w* http.ResponseWriter, r *http.Request) {
|
|||||||
defer this.launchBlackListMutex.Unlock()
|
defer this.launchBlackListMutex.Unlock()
|
||||||
defer this.blockProvinceCityHashMutex.Unlock()
|
defer this.blockProvinceCityHashMutex.Unlock()
|
||||||
|
|
||||||
xobj := q5.NewMxoObject()
|
fillRespObj := func(respObj* q5.MutableXObject, attrName string, mapObj* map[string]int32) {
|
||||||
xobj.SetXValue("errcode", q5.NewXInt32(0))
|
list := q5.NewMxoArray()
|
||||||
xobj.SetXValue("errcode", q5.NewXString(""))
|
for key, _ := range *mapObj {
|
||||||
q5.Response(w, xobj.ToJsonStr())
|
list.PushXValue(q5.NewXString(key))
|
||||||
|
}
|
||||||
|
respObj.SetXObject(attrName, list.AsXObject())
|
||||||
|
}
|
||||||
|
|
||||||
|
respObj := q5.NewMxoObject()
|
||||||
|
respObj.SetXValue("errcode", q5.NewXInt32(0))
|
||||||
|
respObj.SetXValue("errcode", q5.NewXString(""))
|
||||||
|
fillRespObj(respObj, "ip_white_list", &this.ipWhiteList)
|
||||||
|
fillRespObj(respObj, "ip_black_list", &this.ipBlackList)
|
||||||
|
fillRespObj(respObj, "launch_white_list", &this.launchWhiteList)
|
||||||
|
fillRespObj(respObj, "launch_black_list", &this.launchBlackList)
|
||||||
|
fillRespObj(respObj, "block_province_city_list", &this.blockProvinceCityHash)
|
||||||
|
q5.Response(w, respObj.ToJsonStr())
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user