From 9d4afc4402d9ac3fc5e0f4e5f3738781ce4d7f93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20Baz=C3=A1n?= Date: Mon, 18 Jan 2016 16:28:11 -0300 Subject: [PATCH] fix user field --- lib/server.js | 4 ++-- test/integration/server.js | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/server.js b/lib/server.js index fbb0dc7..e4bb3ef 100644 --- a/lib/server.js +++ b/lib/server.js @@ -2433,7 +2433,7 @@ WalletService.prototype.pushNotificationsSubscribe = function(opts, cb) { var self = this; - opts.user = self.walletId + '$' + self.copayerId + '$' + opts.token; + opts.user = self.walletId + '$' + self.copayerId; request({ url: config.pushNotificationsOpts.pushServerUrl + '/subscribe', @@ -2453,7 +2453,7 @@ WalletService.prototype.pushNotificationsUnsubscribe = function(token, cb) { method: 'POST', json: true, body: { - user: self.walletId + '$' + self.copayerId + '$' + token + user: self.walletId + '$' + self.copayerId } }, function(err, response) { return cb(err, response); diff --git a/test/integration/server.js b/test/integration/server.js index ff62e38..63a2de3 100644 --- a/test/integration/server.js +++ b/test/integration/server.js @@ -5478,7 +5478,6 @@ describe('Wallet service', function() { }); args[0].body.user.should.contain(wallet.copayers[0].id); args[0].body.user.should.contain(wallet.id); - args[0].body.user.should.contain('DEVICE_TOKEN'); done(); }); }); @@ -5498,7 +5497,6 @@ describe('Wallet service', function() { args[0].body.user.should.contain(wallet.copayers[0].id); args[0].body.user.should.contain(wallet.id); - args[0].body.user.should.contain('DEVICE_TOKEN'); done(); }); });