s/region/country

This commit is contained in:
Dominic Wong
2022-03-03 11:44:11 +00:00
parent 6a87833d07
commit 58db9322ec

View File

@@ -126,7 +126,7 @@ func (w *Weather) Forecast(ctx context.Context, req *pb.ForecastRequest, rsp *pb
// set the location // set the location
rsp.Location = location["name"].(string) rsp.Location = location["name"].(string)
rsp.Region = location["region"].(string) rsp.Region = location["region"].(string)
rsp.Country = location["region"].(string) rsp.Country = location["country"].(string)
rsp.Latitude = location["lat"].(float64) rsp.Latitude = location["lat"].(float64)
rsp.Longitude = location["lon"].(float64) rsp.Longitude = location["lon"].(float64)
rsp.Timezone = location["tz_id"].(string) rsp.Timezone = location["tz_id"].(string)
@@ -172,7 +172,7 @@ func (w *Weather) Now(ctx context.Context, req *pb.NowRequest, rsp *pb.NowRespon
// set the location // set the location
rsp.Location = location["name"].(string) rsp.Location = location["name"].(string)
rsp.Region = location["region"].(string) rsp.Region = location["region"].(string)
rsp.Country = location["region"].(string) rsp.Country = location["country"].(string)
rsp.Latitude = location["lat"].(float64) rsp.Latitude = location["lat"].(float64)
rsp.Longitude = location["lon"].(float64) rsp.Longitude = location["lon"].(float64)
rsp.Timezone = location["tz_id"].(string) rsp.Timezone = location["tz_id"].(string)