From fa6daa37ebc104ed1ecbd95b3102ed3362a3acd1 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Fri, 29 Aug 2014 09:55:49 -0400 Subject: [PATCH] updated regex to match admin route with no trailing slash --- src/routes/index.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/routes/index.js b/src/routes/index.js index 2d2cd8730e..01b095a092 100644 --- a/src/routes/index.js +++ b/src/routes/index.js @@ -163,8 +163,7 @@ module.exports = function(app, middleware) { app.all(relativePath + '/api/?*', middleware.updateLastOnlineTime, middleware.prepareAPI); app.all(relativePath + '/api/admin/*', middleware.admin.isAdmin, middleware.prepareAPI); - app.all(relativePath + '/admin/*', middleware.admin.isAdmin); - app.get(relativePath + '/admin', middleware.admin.isAdmin); + app.all(relativePath + '/admin/?*', middleware.admin.isAdmin); adminRoutes(router, middleware, controllers); metaRoutes(router, middleware, controllers); @@ -202,9 +201,9 @@ module.exports = function(app, middleware) { plugins.reloadRoutes(); // plugins.ready(function() { // plugins.fireHook('static:app.load', pluginRouter, middleware, controllers, function() { - - + + // }); // }); };