Skip to content

Commit

Permalink
formating
Browse files Browse the repository at this point in the history
  • Loading branch information
Philipp Bisson committed Jun 25, 2020
1 parent bef65f8 commit a127143
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions lib/Request.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,14 +158,13 @@ ApiRequest.prototype.startRequest = function(){

ApiRequest.prototype.startDownload = function () {
var self = this;
if(!this.payload || !this.payload.hasOwnProperty('sink'))
throw new Error('Sink is required to download a file');

if(!this.payload || !this.payload.hasOwnProperty('sink')) {
throw new Error('Sink is required to download a file');
}
var requestOptions = {
url: config.API_URL + self.endPoint + "?" + qs.stringify(createQuery(self)),
headers: self.headers,
};

return new Promise(function (resolve, reject) {
request(requestOptions)
.on('response', function(response) {
Expand Down

0 comments on commit a127143

Please sign in to comment.