require("dotenv").config(); const router = require('express').Router(); const Averages = require('./dailyAveragesModel'); router.get('/:id/averages', (req, res) => { Averages.getDailyAverages(req.params.id) .then(averages => { res.status(200).json(averages); }) .catch(err => res.send(err)); }); module.exports = router;