From 0a3d5c7667bea7c69bf5113a43ca862804b38eba Mon Sep 17 00:00:00 2001 From: Hendy Irawan Date: Sun, 15 Mar 2020 00:59:14 +0700 Subject: [PATCH] Fix API key for subscribe and unsubscribe Fixed #13. --- index.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/index.js b/index.js index fc90e82..72ebf1b 100644 --- a/index.js +++ b/index.js @@ -10,6 +10,7 @@ module.exports = function(url, apiKey) { prty = { subscribe: function(o, cb) { if (this.paramsOk(o, cb)) { + o.api_key = this.apiKey; o.list = o.list_id; delete o.list_id; this.request('subscribe', o, this.getSub(cb)); @@ -17,6 +18,7 @@ prty = { }, unsubscribe: function(o, cb) { if (this.paramsOk(o, cb)) { + o.api_key = this.apiKey; o.list = o.list_id; delete o.list_id; this.request('unsubscribe', o, this.getSub(cb));