diff --git a/cmd/camper-weather/main.go b/cmd/camper-weather/main.go index 42a9e49..824fcab 100644 --- a/cmd/camper-weather/main.go +++ b/cmd/camper-weather/main.go @@ -43,6 +43,10 @@ func main() { } defer conn.Release() + if _, err := conn.Exec(context.Background(), "set role to admin"); err != nil { + log.Fatal(err) + } + var stationURL string if err := conn.QueryRow(context.Background(), ` select station_uri @@ -63,10 +67,6 @@ func main() { log.Fatal(err) } - if _, err := conn.Exec(context.Background(), "set role to admin"); err != nil { - log.Fatal(err) - } - for _, forecast := range result.Forecasts { if _, err := db.Exec(context.Background(), ` update weather_forecast