From b1d6d8199264dc753a93d73a8d45a0e29ba947e7 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Tue, 2 Feb 2016 11:42:24 -0500 Subject: [PATCH] ensuring that auth routes are loaded _after_ plugin routes, just like in a reload. --- src/routes/index.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/routes/index.js b/src/routes/index.js index 5cf9c7696a..feefcdccd0 100644 --- a/src/routes/index.js +++ b/src/routes/index.js @@ -2,6 +2,7 @@ var nconf = require('nconf'), path = require('path'), + async = require('async'), winston = require('winston'), controllers = require('../controllers'), plugins = require('../plugins'), @@ -130,8 +131,10 @@ module.exports = function(app, middleware) { // Add plugin routes - plugins.reloadRoutes(); - authRoutes.reloadRoutes(); + async.series([ + async.apply(plugins.reloadRoutes), + async.apply(authRoutes.reloadRoutes) + ]); }; function handle404(app, middleware) {