From bdcc83dae3742bf1c88da43a23f7278127d6251c Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Fri, 7 Oct 2016 19:48:04 -0400 Subject: some stuff with okpush, add okinstagram to services --- examples/lib/okpush/db.js | 1 - examples/lib/okpush/index.js | 6 ++++-- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'examples/lib') 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() -- cgit v1.2.3-70-g09d2