Browse Source

unsubscribe v2

feat/estimateFee-limit
Ivan Socolsky 8 years ago
parent
commit
b484e2754b
No known key found for this signature in database GPG Key ID: FAECE6A05FAA4F56
  1. 18
      lib/expressapp.js

18
lib/expressapp.js

@ -672,9 +672,25 @@ ExpressApp.prototype.start = function(opts, cb) {
});
});
// DEPRECATED
router.delete('/v1/pushnotifications/subscriptions/', function(req, res) {
logDeprecated(req);
getServerWithAuth(req, res, function(server) {
server.pushNotificationsUnsubscribe({
token: 'dummy'
}, function(err, response) {
if (err) return returnError(err, res, req);
res.json(response);
});
});
});
router.delete('/v2/pushnotifications/subscriptions/:token', function(req, res) {
var opts = {
token: req.params['token'],
};
getServerWithAuth(req, res, function(server) {
server.pushNotificationsUnsubscribe(function(err, response) {
server.pushNotificationsUnsubscribe(opts, function(err, response) {
if (err) return returnError(err, res, req);
res.json(response);
});

Loading…
Cancel
Save