From 58db9322ecf85a4967a9b21b9360cd7073f375b4 Mon Sep 17 00:00:00 2001 From: Dominic Wong Date: Thu, 3 Mar 2022 11:44:11 +0000 Subject: [PATCH] s/region/country --- weather/handler/weather.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/weather/handler/weather.go b/weather/handler/weather.go index bbdd710..3a3caff 100644 --- a/weather/handler/weather.go +++ b/weather/handler/weather.go @@ -126,7 +126,7 @@ func (w *Weather) Forecast(ctx context.Context, req *pb.ForecastRequest, rsp *pb // set the location rsp.Location = location["name"].(string) rsp.Region = location["region"].(string) - rsp.Country = location["region"].(string) + rsp.Country = location["country"].(string) rsp.Latitude = location["lat"].(float64) rsp.Longitude = location["lon"].(float64) 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 rsp.Location = location["name"].(string) rsp.Region = location["region"].(string) - rsp.Country = location["region"].(string) + rsp.Country = location["country"].(string) rsp.Latitude = location["lat"].(float64) rsp.Longitude = location["lon"].(float64) rsp.Timezone = location["tz_id"].(string)