Updated docs button group on Twilio page.
Pass err.message instead of error object to the middleware.
This commit is contained in:
@ -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');
|
||||
});
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user