separate gallery route

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

7
routes/gallery.js Normal file
View File

@ -0,0 +1,7 @@
const galleryRoute = require('express').Router();
galleryRoute.get('/gallery/:id', (req, res, next) => {
return res.redirect(`/comments/${req.params.id}`);
});
module.exports = galleryRoute;

View File

@ -1,3 +1,4 @@
const galleryRoute = require('./gallery');
const homeRoute = require('./home'); const homeRoute = require('./home');
const overridingRoutes = require('./overides'); const overridingRoutes = require('./overides');
const preferenceRoutes = require('./preferences'); const preferenceRoutes = require('./preferences');
@ -19,5 +20,6 @@ allRoutes.use(subscriptionRoutes);
allRoutes.use(saveRoutes); allRoutes.use(saveRoutes);
allRoutes.use(searchRoute); allRoutes.use(searchRoute);
allRoutes.use(homeRoute); allRoutes.use(homeRoute);
allRoutes.use(galleryRoute);
module.exports = allRoutes; module.exports = allRoutes;