Ivan Socolsky
8 years ago
No known key found for this signature in database
GPG Key ID: FAECE6A05FAA4F56
1 changed files with
17 additions and
1 deletions
-
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); |
|
|
|
}); |
|
|
|