Skip to content

Commit 04f5f0b

Browse files
author
Jose Zamora
committed
Merge pull request #144 from aydrian/issue-140
Updated bulk suppression list upsert payload.
2 parents 440cd15 + 64e8e0e commit 04f5f0b

File tree

6 files changed

+6
-6
lines changed

6 files changed

+6
-6
lines changed

examples/suppressionList/checkStatus.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ client.suppressionList.checkStatus('[email protected]', function(err, res) {
99
console.log(err);
1010
} else {
1111
console.log(res.body);
12-
console.log('Congrats you can use our SDK!');
12+
console.log('Congrats you can use our client library!');
1313
}
1414
});

examples/suppressionList/removeStatus.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ client.suppressionList.removeStatus('[email protected]', function(err, res) {
99
console.log(err);
1010
} else {
1111
console.log(res.body);
12-
console.log('Congrats you can use our SDK!');
12+
console.log('Congrats you can use our client library!');
1313
}
1414
});

examples/suppressionList/search_suppressionList.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ client.suppressionList.search(parameters, function(err, res) {
1414
console.log(err);
1515
} else {
1616
console.log(res.body);
17-
console.log('Congrats you can use our SDK!');
17+
console.log('Congrats you can use our client library!');
1818
}
1919
});

examples/suppressionList/upsert.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@ client.suppressionList.upsert(recipient, function(err, res) {
1515
console.log(err);
1616
} else {
1717
console.log(res.body);
18-
console.log('Congrats you can use our SDK!');
18+
console.log('Congrats you can use our client library!');
1919
}
2020
});

examples/suppressionList/upsert_bulk.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,6 @@ client.suppressionList.upsert(recipients, function(err, res) {
2929
console.log(err);
3030
} else {
3131
console.log(res.body);
32-
console.log('Congrats you can use our SDK!');
32+
console.log('Congrats you can use our client library!');
3333
}
3434
});

lib/suppressionList.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ module.exports = function(client) {
6464
// Check for bulk upsert
6565
if(recipient.constructor === Array) {
6666
options.uri = api;
67-
options.json = toApiFormat(recipient);
67+
options.json = { recipients: toApiFormat(recipient) };
6868
} else if(!recipient.email) {
6969
callback(new Error('email is required in the recipient object'));
7070
return;

0 commit comments

Comments
 (0)