From 64e8e0eb487000bd84c4e4d995eb6a32f84b7432 Mon Sep 17 00:00:00 2001 From: "Aydrian J. Howard" Date: Tue, 10 May 2016 09:13:43 -0400 Subject: [PATCH] Updated bulk suppression list upsert payload. Fixes #140 --- examples/suppressionList/checkStatus.js | 2 +- examples/suppressionList/removeStatus.js | 2 +- examples/suppressionList/search_suppressionList.js | 2 +- examples/suppressionList/upsert.js | 2 +- examples/suppressionList/upsert_bulk.js | 2 +- lib/suppressionList.js | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/examples/suppressionList/checkStatus.js b/examples/suppressionList/checkStatus.js index 888dc01..c0a3e31 100644 --- a/examples/suppressionList/checkStatus.js +++ b/examples/suppressionList/checkStatus.js @@ -9,6 +9,6 @@ client.suppressionList.checkStatus('test@test.com', 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!'); } }); diff --git a/examples/suppressionList/removeStatus.js b/examples/suppressionList/removeStatus.js index 75881f8..f315e9e 100644 --- a/examples/suppressionList/removeStatus.js +++ b/examples/suppressionList/removeStatus.js @@ -9,6 +9,6 @@ client.suppressionList.removeStatus('test@test.com', 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!'); } }); diff --git a/examples/suppressionList/search_suppressionList.js b/examples/suppressionList/search_suppressionList.js index 4836870..fa1bbc3 100644 --- a/examples/suppressionList/search_suppressionList.js +++ b/examples/suppressionList/search_suppressionList.js @@ -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!'); } }); diff --git a/examples/suppressionList/upsert.js b/examples/suppressionList/upsert.js index bb7ab8b..f98f2d1 100644 --- a/examples/suppressionList/upsert.js +++ b/examples/suppressionList/upsert.js @@ -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!'); } }); diff --git a/examples/suppressionList/upsert_bulk.js b/examples/suppressionList/upsert_bulk.js index 98171a1..2e14e11 100644 --- a/examples/suppressionList/upsert_bulk.js +++ b/examples/suppressionList/upsert_bulk.js @@ -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!'); } }); diff --git a/lib/suppressionList.js b/lib/suppressionList.js index fdb6ac8..950767d 100644 --- a/lib/suppressionList.js +++ b/lib/suppressionList.js @@ -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;