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:
Julian Lam
2013-07-05 16:17:13 -04:00
parent ab6639e130
commit 5eda18e03c
2 changed files with 3 additions and 1 deletions

View File

@@ -161,6 +161,9 @@
template_data = data;
parse_template();
}).fail(function(data) {
template_data = {};
parse_template();
});
}());

View File

@@ -158,7 +158,6 @@ var express = require('express'),
var category_url = cid + (req.params.slug ? '/' + req.params.slug : '');
categories.getCategoryById(cid, 0, function(returnData) {
res.send(
app.build_header(res) +
'\n\t<noscript>\n' + templates['noscript/header'] + templates['noscript/category'].parse(returnData) + '\n\t</noscript>' +