separate poll route

This commit is contained in:
json 2021-09-02 21:01:40 +01:00
parent 2266c8f0f8
commit a441ecac33
2 changed files with 9 additions and 0 deletions

View File

@ -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;

7
routes/poll.js Normal file
View File

@ -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;