From 5936c72f968428766395f11d6364c147d52b016c Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Tue, 12 Aug 2014 13:57:30 -0400 Subject: [PATCH 1/2] further fix to #1957 --- public/src/ajaxify.js | 3 +-- src/routes/index.js | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/public/src/ajaxify.js b/public/src/ajaxify.js index f2258fb823..06e5731983 100644 --- a/public/src/ajaxify.js +++ b/public/src/ajaxify.js @@ -204,7 +204,6 @@ var ajaxify = ajaxify || {}; } var location = document.location || window.location, - api_url = (url === RELATIVE_PATH || url === '/' + RELATIVE_PATH) ? 'home' : url, tpl_url = ajaxify.getCustomTemplateMapping(url.split('?')[0]); if (!tpl_url) { @@ -212,7 +211,7 @@ var ajaxify = ajaxify || {}; } apiXHR = $.ajax({ - url: RELATIVE_PATH + '/api/' + api_url, + url: RELATIVE_PATH + '/api/' + url, cache: false, success: function(data) { if (!data) { diff --git a/src/routes/index.js b/src/routes/index.js index 9fe56381f4..2df7114838 100644 --- a/src/routes/index.js +++ b/src/routes/index.js @@ -19,6 +19,7 @@ var nconf = require('nconf'), function mainRoutes(app, middleware, controllers) { app.get('/', middleware.buildHeader, controllers.home); + app.get('/api', controllers.home); app.get('/api/home', controllers.home); app.get('/login', middleware.redirectToAccountIfLoggedIn, middleware.buildHeader, controllers.login); From cf6acf6b4117748f1a1a1f69a4ebe330f1af3c21 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Tue, 12 Aug 2014 14:02:40 -0400 Subject: [PATCH 2/2] sacrificing a goat to ensure this doesn't come back to bite me --- src/routes/index.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/routes/index.js b/src/routes/index.js index 2df7114838..e53ebbe275 100644 --- a/src/routes/index.js +++ b/src/routes/index.js @@ -20,7 +20,6 @@ var nconf = require('nconf'), function mainRoutes(app, middleware, controllers) { app.get('/', middleware.buildHeader, controllers.home); app.get('/api', controllers.home); - app.get('/api/home', controllers.home); app.get('/login', middleware.redirectToAccountIfLoggedIn, middleware.buildHeader, controllers.login); app.get('/api/login', middleware.redirectToAccountIfLoggedIn, controllers.login);