refactor: refactor routes

This commit is contained in:
Khaled Garbaya
2017-10-23 14:40:20 +02:00
committed by Benedikt Rötsch
parent 8640483af3
commit 1e94188333
7 changed files with 61 additions and 70 deletions

View File

@@ -1,10 +1,5 @@
const express = require('express')
const { catchErrors } = require('../handlers/errorHandlers')
const router = express.Router()
/* GET category listing. */
router.get('/', catchErrors(async function (req, res, next) {
exports.getCategories = async (req, res, next) => {
res.render('categories', { title: 'Categories' })
}))
}
module.exports = router