Using the newest clockwork npm package
This commit is contained in:
2
app.js
2
app.js
@ -126,9 +126,9 @@ app.get('/api/paypal/cancel', apiController.getPayPalCancel);
|
||||
app.get('/api/steam', apiController.getSteam);
|
||||
app.get('/api/scraping', apiController.getScraping);
|
||||
app.get('/api/twilio', apiController.getTwilio);
|
||||
app.post('/api/twilio', apiController.postTwilio);
|
||||
app.get('/api/clockwork', apiController.getClockwork);
|
||||
app.post('/api/clockwork', apiController.postClockwork);
|
||||
app.post('/api/twilio', apiController.postTwilio);
|
||||
app.get('/api/foursquare', passportConf.isAuthenticated, passportConf.isAuthorized, apiController.getFoursquare);
|
||||
app.get('/api/tumblr', passportConf.isAuthenticated, passportConf.isAuthorized, apiController.getTumblr);
|
||||
app.get('/api/facebook', passportConf.isAuthenticated, passportConf.isAuthorized, apiController.getFacebook);
|
||||
|
@ -430,7 +430,7 @@ exports.getClockwork = function(req, res, next) {
|
||||
|
||||
|
||||
/**
|
||||
* POST /api/clockwork
|
||||
* POST /api/Clockwork
|
||||
* Clockwork SMS API example.
|
||||
* @param telephone
|
||||
*/
|
||||
@ -443,7 +443,7 @@ exports.postClockwork = function(req, res, next) {
|
||||
};
|
||||
clockwork.sendSms(message, function(err, responseData) {
|
||||
if (err) return next(err.message);
|
||||
req.flash('success', { msg: 'Text sent to ' + responseData.SMS_Resp.To});
|
||||
req.flash('success', { msg: 'Text sent to ' + responseData.responses[0].to});
|
||||
res.redirect('/api/clockwork');
|
||||
});
|
||||
};
|
||||
|
@ -39,7 +39,7 @@
|
||||
"paypal-rest-sdk": "~0.6.4",
|
||||
"connect-mongo": "~0.4.0",
|
||||
"twilio": "~1.5.0",
|
||||
"clockwork": ">=0.1.0",
|
||||
"clockwork": "~0.1.1",
|
||||
"validator": "~3.3.0",
|
||||
"csso": "~1.3.11",
|
||||
"uglify-js": "~2.4.12"
|
||||
|
Reference in New Issue
Block a user