geographic.js 284 Bytes
Newer Older
ι™ˆεΈ…'s avatar
ι™ˆεΈ… committed
1 2
import city from './geographic/city.json';
import province from './geographic/province.json';
3 4

export function getProvince(req, res) {
ι™ˆεΈ…'s avatar
ι™ˆεΈ… committed
5
  res.json(province);
6 7 8
}

export function getCity(req, res) {
ι™ˆεΈ…'s avatar
ι™ˆεΈ… committed
9
  res.json(city[req.params.province]);
10 11 12 13 14 15
}

export default {
  getProvince,
  getCity,
};