Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions lib/apicontrollersbase.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class APIOperationBase {
if(this._response){
message = this._response.message;
}

return message;
}

Expand All @@ -58,7 +58,7 @@ class APIOperationBase {

setClientId() {
for(var obj in this._request){
this._request[obj]['clientId'] = config.clientId;
this._request[obj]['clientId'] = config.clientId;
break;
}
}
Expand Down Expand Up @@ -99,7 +99,8 @@ class APIOperationBase {
request(reqOpts, function(error, response, body){
if(error) {
logger.error(error);
} else
callback(error, null);
} else
{
//TODO: slice added due to BOM character. remove once BOM character is removed.
var responseObj = JSON.parse(body.slice(1));
Expand All @@ -112,7 +113,7 @@ class APIOperationBase {
logger.debug("Response: " + JSON.stringify(body, 2, null));
obj._response = body;
*/
callback();
callback(null, responseObj);
}
});

Expand Down