fix web getUrl api function

This commit is contained in:
reality 2013-04-14 03:53:53 +00:00
parent c1f642084d
commit 5e063ac24a

View File

@ -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;
}
}
};