moved setupPageRoute to helpers
parent
8c79e11dae
commit
ac1e0513fc
@ -0,0 +1,12 @@
|
|||||||
|
'use strict';
|
||||||
|
|
||||||
|
var helpers = {};
|
||||||
|
|
||||||
|
helpers.setupPageRoute = function(router, name, middleware, middlewares, controller) {
|
||||||
|
middlewares = middlewares.concat([middleware.pageView]);
|
||||||
|
|
||||||
|
router.get(name, middleware.buildHeader, middlewares, controller);
|
||||||
|
router.get('/api' + name, middlewares, controller);
|
||||||
|
};
|
||||||
|
|
||||||
|
module.exports = helpers;
|
Loading…
Reference in New Issue