Skip to content

Commit

Permalink
Merge pull request #144 from aydrian/issue-140
Browse files Browse the repository at this point in the history
Updated bulk suppression list upsert payload.
  • Loading branch information
Jose Zamora committed May 10, 2016
2 parents 440cd15 + 64e8e0e commit 04f5f0b
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion examples/suppressionList/checkStatus.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ client.suppressionList.checkStatus('[email protected]', function(err, res) {
console.log(err);
} else {
console.log(res.body);
console.log('Congrats you can use our SDK!');
console.log('Congrats you can use our client library!');
}
});
2 changes: 1 addition & 1 deletion examples/suppressionList/removeStatus.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ client.suppressionList.removeStatus('[email protected]', function(err, res) {
console.log(err);
} else {
console.log(res.body);
console.log('Congrats you can use our SDK!');
console.log('Congrats you can use our client library!');
}
});
2 changes: 1 addition & 1 deletion examples/suppressionList/search_suppressionList.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ client.suppressionList.search(parameters, function(err, res) {
console.log(err);
} else {
console.log(res.body);
console.log('Congrats you can use our SDK!');
console.log('Congrats you can use our client library!');
}
});
2 changes: 1 addition & 1 deletion examples/suppressionList/upsert.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ client.suppressionList.upsert(recipient, function(err, res) {
console.log(err);
} else {
console.log(res.body);
console.log('Congrats you can use our SDK!');
console.log('Congrats you can use our client library!');
}
});
2 changes: 1 addition & 1 deletion examples/suppressionList/upsert_bulk.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@ client.suppressionList.upsert(recipients, function(err, res) {
console.log(err);
} else {
console.log(res.body);
console.log('Congrats you can use our SDK!');
console.log('Congrats you can use our client library!');
}
});
2 changes: 1 addition & 1 deletion lib/suppressionList.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ module.exports = function(client) {
// Check for bulk upsert
if(recipient.constructor === Array) {
options.uri = api;
options.json = toApiFormat(recipient);
options.json = { recipients: toApiFormat(recipient) };
} else if(!recipient.email) {
callback(new Error('email is required in the recipient object'));
return;
Expand Down

0 comments on commit 04f5f0b

Please sign in to comment.