Return empty rawIspInfo when no ISP info is obtained

This commit is contained in:
Maddie Zhan 2020-03-04 21:35:49 +08:00
parent 79b4c54770
commit 73318e153b

View file

@ -179,6 +179,9 @@ func getIP(w http.ResponseWriter, r *http.Request) {
}
ret.ProcessedString += " - " + isp
} else {
// return an empty JSON object to avoid parse errors
ret.RawISPInfo = "{}"
}
render.JSON(w, r, ret)