Updated docs button group on Twilio page.

Pass err.message instead of error object to the middleware.
This commit is contained in:
Sahat Yalkabov
2014-02-06 08:33:37 -05:00
parent 78a3e681fb
commit aec3807d34
2 changed files with 6 additions and 6 deletions

View File

@ -396,7 +396,7 @@ exports.postTwilio = function(req, res, next) {
body: 'Hello from the Hackathon Starter'
};
twilio.sendMessage(message, function(err, responseData) {
if (err) return next(err);
if (err) return next(err.message);
req.flash('success', { msg: 'Text sent to ' + responseData.to + '.'})
res.redirect('/api/twilio');
});

View File

@ -7,15 +7,15 @@ block content
| Twilio API
.btn-group.btn-group-justified
a.btn.btn-primary(href='http://developer.nytimes.com/page', target='_blank')
a.btn.btn-primary(href='http://twilio.github.io/twilio-node/', target='_blank')
i.fa.fa-check-square-o
| Overview
a.btn.btn-primary(href='http://prototype.nytimes.com/gst/apitool/index.html', target='_blank')
| Twilio Node
a.btn.btn-primary(href='https://apigee.com/console/twilio', target='_blank')
i.fa.fa-laptop
| API Console
a.btn.btn-primary(href='http://developer.nytimes.com/docs', target='_blank')
a.btn.btn-primary(href='https://www.twilio.com/docs/api/rest', target='_blank')
i.fa.fa-code-fork
| API Endspoints
| REST API
h4 Send a text message
.row