From 43808c01ecb0cacb329e6ae6013c7c13554fefb9 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Fri, 24 Jan 2014 10:00:57 -0500 Subject: [PATCH] reduced the number of 'ajaxify.go' calls to one, in /src --- src/webserver.js | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/src/webserver.js b/src/webserver.js index 0a81db656f..615a3e44c8 100644 --- a/src/webserver.js +++ b/src/webserver.js @@ -400,7 +400,11 @@ if(nconf.get('ssl')) { }; app.create_route = function (url, tpl) { // to remove - return ''; + var routerScript = ''; + + return routerScript; }; app.namespace(nconf.get('relative_path'), function () { @@ -648,8 +652,7 @@ if(nconf.get('ssl')) { res.send( data.header + '\n\t' + - '\n\t' + - templates.footer + '\n\t' + app.create_route('topic/' + topic_url) + templates.footer ); }); }); @@ -763,8 +766,7 @@ if(nconf.get('ssl')) { res.send( data.header + '\n\t' + - '\n\t' + - templates.footer + '\n\t' + app.create_route('category/' + category_url) + templates.footer ); }); }); @@ -774,7 +776,7 @@ if(nconf.get('ssl')) { req: req, res: res }, function (err, header) { - res.send(header + '' + templates.footer); + res.send(header + app.create_route('confirm/' + req.params.code) + templates.footer); }); }); @@ -845,11 +847,7 @@ if(nconf.get('ssl')) { req: req, res: res }, function (err, header) { - res.send( - header + - '\n\t' + - templates.footer - ); + res.send(header + app.create_route('outgoing?url=' + encodeURIComponent(req.query.url)) + templates.footer); }); });