From dd2f5af97f1ceccd049528743ca0e75ed2fe71c0 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Sun, 19 Feb 2017 04:41:51 +0100 Subject: push frontend --- lib/okpush/index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/okpush/index.js') diff --git a/lib/okpush/index.js b/lib/okpush/index.js index 6de59ac5..d696c350 100644 --- a/lib/okpush/index.js +++ b/lib/okpush/index.js @@ -99,10 +99,10 @@ function OKPush (options) { }) router.post('/send', bodyParser.urlencoded({ extended: false }), function (req, res) { - var key = req.body.key - var opt = options.config.notifications[key] + var channel = req.body.channel + var opt = options.config.notifications[channel] var note = apn.buildPayload(opt, options.config.bundleId) - // apn.push(note) + apn.push(channel, note) db.updateNotification(key, function(){ res.send(200) }) -- cgit v1.2.3-70-g09d2