summaryrefslogtreecommitdiff
path: root/lib/okpush/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/okpush/index.js')
-rw-r--r--lib/okpush/index.js6
1 files changed, 3 insertions, 3 deletions
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)
})