From 5e063ac24ae4ea91ac3b567ffc5c07fcea66d8c7 Mon Sep 17 00:00:00 2001 From: reality Date: Sun, 14 Apr 2013 03:53:53 +0000 Subject: [PATCH] fix web getUrl api function --- modules/web/web.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/web/web.js b/modules/web/web.js index 05c7bae..d860f32 100644 --- a/modules/web/web.js +++ b/modules/web/web.js @@ -41,10 +41,13 @@ var webInterface = function(dbot) { this.api = { 'getUrl': function(path) { + console.log(path); if(this.config.externalPath) { + console.log('external'); return this.config.externalPath + '/' + path; } else { - return 'http://' + this.config.webHost + ':' + port + '/' + path; + console.log('internal'); + return 'http://' + this.config.webHost + ':' + this.config.webPort + '/' + path; } } };