fix: statistic upstream url change & save article to private
This commit is contained in:
@@ -45,13 +45,9 @@ type AreaSlice []models.AreaInfo
|
||||
|
||||
func cacheNCovStatistics() {
|
||||
resp := utils.GetWhioutHeader(global.CHINA_NCOV_STATISTIC_URL)
|
||||
var nCovRes map[string]string
|
||||
var nCovRes map[string]interface{}
|
||||
json.Unmarshal([]byte(resp), &nCovRes)
|
||||
var nCovResData map[string]interface{}
|
||||
err := json.Unmarshal([]byte(nCovRes["data"]), &nCovResData)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
nCovResData := (nCovRes["data"].(map[string]interface{}))["diseaseh5Shelf"].(map[string]interface{})
|
||||
if !needToRecache(nCovResData) {
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user