|
@@ -31,9 +31,10 @@ func main() {
|
|
log.Fatalf("can not read resp, err: %+v", err)
|
|
log.Fatalf("can not read resp, err: %+v", err)
|
|
}
|
|
}
|
|
countryCode := gjson.Get(string(bs), "country_code").String()
|
|
countryCode := gjson.Get(string(bs), "country_code").String()
|
|
- log.Printf("get country code: %s", countryCode)
|
|
|
|
|
|
+ ip := gjson.Get(string(bs), "ip").String()
|
|
|
|
+ log.Printf("ipinfo: %s", string(bs))
|
|
|
|
|
|
- request := dto.RegisterRequest{CountryCode: countryCode, Secret: buf.String()}
|
|
|
|
|
|
+ request := dto.RegisterRequest{Ip: ip, CountryCode: countryCode, Secret: buf.String()}
|
|
body, err := json.Marshal(request)
|
|
body, err := json.Marshal(request)
|
|
if err != nil {
|
|
if err != nil {
|
|
log.Printf("err: %+v", err)
|
|
log.Printf("err: %+v", err)
|