mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-17 19:21:04 +01:00
fixing issue with routes that don't have (or need) a corresponding api_method case from crashing due to 404. (issue #53)
This commit is contained in:
@@ -161,6 +161,9 @@
|
|||||||
|
|
||||||
template_data = data;
|
template_data = data;
|
||||||
parse_template();
|
parse_template();
|
||||||
|
}).fail(function(data) {
|
||||||
|
template_data = {};
|
||||||
|
parse_template();
|
||||||
});
|
});
|
||||||
}());
|
}());
|
||||||
|
|
||||||
|
|||||||
@@ -158,7 +158,6 @@ var express = require('express'),
|
|||||||
|
|
||||||
var category_url = cid + (req.params.slug ? '/' + req.params.slug : '');
|
var category_url = cid + (req.params.slug ? '/' + req.params.slug : '');
|
||||||
categories.getCategoryById(cid, 0, function(returnData) {
|
categories.getCategoryById(cid, 0, function(returnData) {
|
||||||
|
|
||||||
res.send(
|
res.send(
|
||||||
app.build_header(res) +
|
app.build_header(res) +
|
||||||
'\n\t<noscript>\n' + templates['noscript/header'] + templates['noscript/category'].parse(returnData) + '\n\t</noscript>' +
|
'\n\t<noscript>\n' + templates['noscript/header'] + templates['noscript/category'].parse(returnData) + '\n\t</noscript>' +
|
||||||
|
|||||||
Reference in New Issue
Block a user