Using the newest clockwork npm package

This commit is contained in:
Matt Roberts
2014-02-27 16:34:45 +00:00
parent 3f9d2f3d7d
commit a76a500d76
3 changed files with 4 additions and 4 deletions

2
app.js
View File

@ -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);

View File

@ -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');
});
};

View File

@ -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"