dijkstra-backend/api/routes/roadsRouter.js
2020-02-08 19:59:51 +01:00

14 lines
308 B
JavaScript

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;