feat: URL trailing slashes remove + All pages basepath

This commit is contained in:
NGPixel
2017-04-23 10:56:14 -04:00
parent db16eb72f0
commit f44d0a3c44
6 changed files with 46 additions and 4 deletions

View File

@@ -137,8 +137,12 @@ router.put('/create/*', (req, res, next) => {
/**
* View tree view of all pages
*/
router.get('/all', (req, res, next) => {
res.render('pages/all')
router.use((req, res, next) => {
if (_.endsWith(req.url, '/all')) {
res.render('pages/all')
} else {
next()
}
})
// ==========================================