executing core middlewares first before secondary or plugin middlewares

v1.18.x
Julian Lam 8 years ago
parent 72092f7109
commit dbb71423a8

@ -3,7 +3,7 @@
var helpers = {};
helpers.setupPageRoute = function (router, name, middleware, middlewares, controller) {
middlewares = middlewares.concat([middleware.registrationComplete, middleware.pageView, middleware.pluginHooks]);
middlewares = [middleware.registrationComplete, middleware.pageView, middleware.pluginHooks].concat(middlewares);
router.get(name, middleware.busyCheck, middleware.buildHeader, middlewares, controller);
router.get('/api' + name, middlewares, controller);

Loading…
Cancel
Save