diff options
| -rw-r--r-- | index.js | 8 | ||||
| -rw-r--r-- | lib/okpush/index.js | 3 |
2 files changed, 7 insertions, 4 deletions
@@ -85,7 +85,7 @@ var app = okcms.createApp({ push: { lib: require("./lib/okpush"), mongodbUrl: "mongodb://localhost/okpush_stone", - production: true, + production: false, apn_development: { cert: path.join(__dirname, "./lib/okpush/certs/aps_development_cert.pem"), key: path.join(__dirname, "./lib/okpush/certs/aps_development_key.pem"), @@ -94,10 +94,10 @@ var app = okcms.createApp({ } }, apn_production: { - cert: path.join(__dirname, "./lib/okpush/certs/aps_production_cert.pem"), - key: path.join(__dirname, "./lib/okpush/certs/aps_production_key.pem"), + // cert: path.join(__dirname, "./lib/okpush/certs/aps_production_cert.pem"), + // key: path.join(__dirname, "./lib/okpush/certs/aps_production_key.pem"), connection: { - gateway: "gateway.push.apple.com", + // gateway: "gateway.push.apple.com", } }, bundleId: "us.okfoc.stoneisland", diff --git a/lib/okpush/index.js b/lib/okpush/index.js index 391f64f9..9ad6307a 100644 --- a/lib/okpush/index.js +++ b/lib/okpush/index.js @@ -118,6 +118,9 @@ function OKPush (options) { router.post('/custom', bodyParser.urlencoded({ extended: false }), function (req, res) { var message = req.body.message var url = req.body.url + if (! message || ! url) { + return res.sendStatus(500) + } var opt = { alert: message, payload: { 'url': url }, |
