|
@@ -32,9 +32,10 @@ func main() {
|
|
|
}
|
|
|
countryCode := gjson.Get(string(bs), "country_code").String()
|
|
|
ip := gjson.Get(string(bs), "ip").String()
|
|
|
+ city := gjson.Get(string(bs), "city").String()
|
|
|
log.Printf("ipinfo: %s", string(bs))
|
|
|
|
|
|
- request := dto.RegisterRequest{Ip: ip, CountryCode: countryCode, Secret: buf.String()}
|
|
|
+ request := dto.RegisterRequest{Ip: ip, CountryCode: countryCode, CountryName: city, Secret: buf.String()}
|
|
|
body, err := json.Marshal(request)
|
|
|
if err != nil {
|
|
|
log.Printf("err: %+v", err)
|