Comparing version 0.5.0 to 0.5.1
@@ -87,9 +87,13 @@ 'use strict'; | ||
qs: params | ||
}, processResponse); | ||
}, function(err, res, body) { | ||
processResponse(err, res, body, params.format); | ||
}); | ||
} else { | ||
request.post({url: this.sql_api_url, form: params | ||
}, processResponse); | ||
}, function(err, res, body) { | ||
processResponse(err, res, body, params.format); | ||
}); | ||
} | ||
function processResponse(err, res, body) { | ||
function processResponse(err, res, body, format) { | ||
if(!err && res.statusCode === 200) { | ||
@@ -99,3 +103,3 @@ debug('Successful response from the server'); | ||
var promiseWillEmit = (options.format === 'json') ? JSON.parse(body) : body; | ||
var promiseWillEmit = (format === 'json') ? JSON.parse(body) : body; | ||
promise.emit('done', promiseWillEmit); | ||
@@ -102,0 +106,0 @@ if(cb) cb(body); |
@@ -5,3 +5,3 @@ { | ||
"private": false, | ||
"version": "0.5.0", | ||
"version": "0.5.1", | ||
"main": "index", | ||
@@ -8,0 +8,0 @@ "url": "https://github.com/CartoDB/cartodb-nodejs", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
333294
900
0