fixed provider url generation

This commit is contained in:
javi 2013-10-31 14:39:55 +01:00
parent 79becc8ae1
commit 9438f8c9f8
2 changed files with 2 additions and 2 deletions

View File

@ -129,7 +129,7 @@
url: function() {
var opts = this.options;
var port = opts.sql_api_port;
var domain = (opts.sql_api_domain || (this.options.user + '.cartodb.com')) + (port ? ':' + port: '');
var domain = (opts.user_name + '.' + (opts.sql_api_domain || 'cartodb.com')) + (port ? ':' + port: '');
var protocol = opts.sql_api_protocol || 'http';
return this.options.url || protocol + '://' + domain + '/api/v2/sql';
},

View File

@ -4,7 +4,7 @@ module('provider.json')
QUnit.testStart(function() {
json = new torque.providers.json({
table: 'test',
user: "rambo",
user_name: "rambo",
resolution: 1,
steps: 10,
extra_params: {