diff --git a/routes/index.js b/routes/index.js index f5caf33..8541395 100644 --- a/routes/index.js +++ b/routes/index.js @@ -1,6 +1,7 @@ const galleryRoute = require('./gallery'); const homeRoute = require('./home'); const overridingRoutes = require('./overides'); +const pollRoute = require('./poll'); const preferenceRoutes = require('./preferences'); const saveRoutes = require('./save'); const searchRoute = require('./search'); @@ -21,5 +22,6 @@ allRoutes.use(saveRoutes); allRoutes.use(searchRoute); allRoutes.use(homeRoute); allRoutes.use(galleryRoute); +allRoutes.use(pollRoute); module.exports = allRoutes; diff --git a/routes/poll.js b/routes/poll.js new file mode 100644 index 0000000..83c4dab --- /dev/null +++ b/routes/poll.js @@ -0,0 +1,7 @@ +const pollRoute = require('express').Router(); + +pollRoute.get('/poll/:id', (req, res, next) => { + return res.redirect(`/comments/${req.params.id}`); +}); + +module.exports = pollRoute;