summaryrefslogtreecommitdiff
path: root/lib/okpush/index.js
diff options
context:
space:
mode:
authorJules Laplace <jules@okfoc.us>2017-02-19 04:41:51 +0100
committerJules Laplace <jules@okfoc.us>2017-02-19 04:41:51 +0100
commitdd2f5af97f1ceccd049528743ca0e75ed2fe71c0 (patch)
treec499219a8648e539f74ef1a3a2f66d4bfb112a71 /lib/okpush/index.js
parent2e3218ddd0dd4cccf9038f1fc7b6565c7bad7595 (diff)
push frontend
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)
})