change column name from 'city' to 'region'
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
const geographies = [
|
||||
const regions = [
|
||||
{
|
||||
"ime":" Sarajevo",
|
||||
"id":"sarajevo",
|
||||
@@ -872,12 +872,12 @@ const geographies = [
|
||||
}
|
||||
];
|
||||
|
||||
const regions = () => {
|
||||
return geographies.map( (g) => ({ ime: g.ime, id: g.id, olxid: g.olxid }) );
|
||||
const getRegions = () => {
|
||||
return regions.map( (g) => ({ ime: g.ime, id: g.id, olxid: g.olxid }) );
|
||||
};
|
||||
|
||||
const getMunicipalitiesForRegion = (regionId) => {
|
||||
for (geo of geographies) {
|
||||
for (geo of regions) {
|
||||
if(geo.id === regionId) {
|
||||
return geo.mjesta;
|
||||
}
|
||||
@@ -886,6 +886,6 @@ const getMunicipalitiesForRegion = (regionId) => {
|
||||
};
|
||||
|
||||
module.exports = {
|
||||
regions,
|
||||
getRegions,
|
||||
getMunicipalitiesForRegion
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user