Remove leading slash in url api maker [#435]

This commit is contained in:
reality 2013-05-06 20:09:19 +00:00
parent 5b0f4d3ae8
commit e8537a93b2

View File

@ -60,12 +60,10 @@ var webInterface = function(dbot) {
this.api = {
'getUrl': function(path) {
console.log(path);
if(path.charAt(0) == '/') path = path.substr(1);
if(this.config.externalPath) {
console.log('external');
return this.config.externalPath + '/' + path;
} else {
console.log('internal');
return 'http://' + this.config.webHost + ':' + this.config.webPort + '/' + path;
}
}