mirror of
https://codeberg.org/tacerus/teddit.git
synced 2024-11-25 16:49:26 +01:00
separate static routes
This commit is contained in:
parent
fca71bd5a7
commit
687857aec6
@ -1,7 +1,9 @@
|
|||||||
const overridingRoutes = require('./overides');
|
const overridingRoutes = require('./overides');
|
||||||
|
const staticRoutes = require('./static');
|
||||||
|
|
||||||
const allRoutes = require('express').Router();
|
const allRoutes = require('express').Router();
|
||||||
|
|
||||||
allRoutes.use(overridingRoutes);
|
allRoutes.use(overridingRoutes);
|
||||||
|
allRoutes.use(staticRoutes);
|
||||||
|
|
||||||
module.exports = allRoutes;
|
module.exports = allRoutes;
|
||||||
|
11
routes/static.js
Normal file
11
routes/static.js
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
const staticRoutes = require('express').Router();
|
||||||
|
|
||||||
|
staticRoutes.get('/privacy', (req, res, next) => {
|
||||||
|
return res.render('privacypolicy', { user_preferences: req.cookies });
|
||||||
|
});
|
||||||
|
|
||||||
|
staticRoutes.get('/about', (req, res, next) => {
|
||||||
|
return res.render('about', { user_preferences: req.cookies });
|
||||||
|
});
|
||||||
|
|
||||||
|
module.exports = staticRoutes;
|
Loading…
Reference in New Issue
Block a user