1
0
mirror of https://github.com/chillzhuang/Sword synced 2024-11-24 19:29:27 +08:00
Sword/mock/geographic.js

16 lines
354 B
JavaScript
Raw Normal View History

2019-02-13 17:16:39 +08:00
import city from './geographic/city.json';
import province from './geographic/province.json';
function getProvince(req, res) {
return res.json(province);
}
function getCity(req, res) {
return res.json(city[req.params.province]);
}
export default {
'GET /api/geographic/province': getProvince,
'GET /api/geographic/city/:province': getCity,
};