mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-07 14:35:47 +01:00
further fix to #1957
This commit is contained in:
@@ -204,7 +204,6 @@ var ajaxify = ajaxify || {};
|
|||||||
}
|
}
|
||||||
|
|
||||||
var location = document.location || window.location,
|
var location = document.location || window.location,
|
||||||
api_url = (url === RELATIVE_PATH || url === '/' + RELATIVE_PATH) ? 'home' : url,
|
|
||||||
tpl_url = ajaxify.getCustomTemplateMapping(url.split('?')[0]);
|
tpl_url = ajaxify.getCustomTemplateMapping(url.split('?')[0]);
|
||||||
|
|
||||||
if (!tpl_url) {
|
if (!tpl_url) {
|
||||||
@@ -212,7 +211,7 @@ var ajaxify = ajaxify || {};
|
|||||||
}
|
}
|
||||||
|
|
||||||
apiXHR = $.ajax({
|
apiXHR = $.ajax({
|
||||||
url: RELATIVE_PATH + '/api/' + api_url,
|
url: RELATIVE_PATH + '/api/' + url,
|
||||||
cache: false,
|
cache: false,
|
||||||
success: function(data) {
|
success: function(data) {
|
||||||
if (!data) {
|
if (!data) {
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ var nconf = require('nconf'),
|
|||||||
|
|
||||||
function mainRoutes(app, middleware, controllers) {
|
function mainRoutes(app, middleware, controllers) {
|
||||||
app.get('/', middleware.buildHeader, controllers.home);
|
app.get('/', middleware.buildHeader, controllers.home);
|
||||||
|
app.get('/api', controllers.home);
|
||||||
app.get('/api/home', controllers.home);
|
app.get('/api/home', controllers.home);
|
||||||
|
|
||||||
app.get('/login', middleware.redirectToAccountIfLoggedIn, middleware.buildHeader, controllers.login);
|
app.get('/login', middleware.redirectToAccountIfLoggedIn, middleware.buildHeader, controllers.login);
|
||||||
|
|||||||
Reference in New Issue
Block a user