dijkstra-backend/api/routes/citiesRouter.js

15 lines
315 B
JavaScript
Raw Normal View History

2020-02-08 18:59:51 +00:00
const router = require('express').Router();
const Cities = require('../models/citiesModel');
router.get('', async (req, res) => {
try {
const cities = await Cities.getCities();
res.status(200).json(cities);
} catch (e) {
res.status(500).json(e);
}
})
module.exports = router;