summaryrefslogtreecommitdiff
path: root/examples/lib/okpush
diff options
context:
space:
mode:
Diffstat (limited to 'examples/lib/okpush')
-rw-r--r--examples/lib/okpush/db.js1
-rw-r--r--examples/lib/okpush/index.js6
2 files changed, 4 insertions, 3 deletions
diff --git a/examples/lib/okpush/db.js b/examples/lib/okpush/db.js
index 83a6ebc..b926ee9 100644
--- a/examples/lib/okpush/db.js
+++ b/examples/lib/okpush/db.js
@@ -80,7 +80,6 @@ function updateNotification (key, cb) {
note.last_push = now
note.save()
}
- console.log(note, created)
cb(null, note)
})
}
diff --git a/examples/lib/okpush/index.js b/examples/lib/okpush/index.js
index 04cf33a..6ef83c6 100644
--- a/examples/lib/okpush/index.js
+++ b/examples/lib/okpush/index.js
@@ -1,4 +1,5 @@
/**
+ * OKPush - Handles basic broadcast push notifications, as well as keeping track of tokens.
*/
var path = require('path')
@@ -28,6 +29,8 @@ function OKPush (options) {
throw new Error('Notifications not provided to OKPush')
if (!options.config.bundleId)
throw new Error('bundleId not provided to OKPush')
+ if (!options.config.mongodbUrl)
+ throw new Error('mongodbUrl not provided to OKPush')
var express = options.express
var router = express.Router()
@@ -50,9 +53,8 @@ function OKPush (options) {
router.use('/admin/', passport.initialize())
router.use('/public/', express.static(path.join(__dirname, './public')));
- // monkeypatch because of this app.use(router) shit.. obnoxious
+ // monkeypatch because of app.use(router) .. obnoxious
router.all('/admin/(:path*)?', function (req, res, next) {
- // req.url = "/_services/push" + req.url
req.newUrl = req.url
req.url = req.originalUrl
next()