diff --git a/server.py b/server.py index aa0bff6..dd33e8d 100644 --- a/server.py +++ b/server.py @@ -24,9 +24,9 @@ def get_coordinates(location, geocoder, cache_db): loc = geocoder.forward(location) coordinates = loc.geojson()['features'][0]['center'] - cache_db.execute("insert into location(name, lat, lon) values(?,?,?)", + cache_db.execute("insert into location(name, lon, lat) values(?,?,?)", (location, *coordinates)) - return tuple(coordinates) + return (coordinates[1], coordinates[0]) def get_weather(coordinates):