Closed esirK closed 3 years ago
- Why do we need the geo reversing in the api itself? Each function responsible of pushing data should provide correct location moving foward, right?
Yes moving forward we expect that. But we aren't guaranteed that will always be the case so I'm just leaving the management command here just in case anyone needs it in the future.
Shouldn't cities be part of location with countries in meta?
I've attached the screen shot to show how it will look like. I asked @KobbyMmo before adding sensors_cities as their own object
Shouldn't cities be part of location with countries in meta?
I've attached the screen shot to show how it will look like. I asked @KobbyMmo before adding sensors_cities as their own object
Nah, you can't have sensors_locations
to mean countries only and have separate _sensorscities... either have sensors_countries
and sensors_cities
as standalone objects or one sensors_locations
return countries
and their count
as well as cities
and their count
.
It should even be cities in their respective countries but it's too late for today I think.
Yea @esirK , what you have will work for me
This will also be fine.
location:{
cities:{
count: 12, data: []
},
countries:{
count: 12, data: []
}
}
@KobbyMmo I'll stick to what we have for now. The only thing you will change is using sensors_countries
instead of sensors_locations
Description
Adds management command to reverse geocode nodes locations and update the city names for nodes with no city associated with them
Fixes # (issue)
Type of change
Screenshots
Checklist: