summaryrefslogtreecommitdiff
path: root/examples/lib/okpush
diff options
context:
space:
mode:
authorJules Laplace <jules@okfoc.us>2016-10-07 19:48:04 -0400
committerJules Laplace <jules@okfoc.us>2016-10-07 19:48:04 -0400
commitbdcc83dae3742bf1c88da43a23f7278127d6251c (patch)
treea769f00862270da42633b85958505a74dfe935d9 /examples/lib/okpush
parentd2299d24a23c9d0d835631b72e4f1d1974958f94 (diff)
some stuff with okpush, add okinstagram to servicesv0.2.2
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()