dijkstra-backend/api/routes/roadsRouter.js

14 lines
308 B
JavaScript
Raw Normal View History

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