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'
|
body: 'Hello from the Hackathon Starter'
|
||||||
};
|
};
|
||||||
twilio.sendMessage(message, function(err, responseData) {
|
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 + '.'})
|
req.flash('success', { msg: 'Text sent to ' + responseData.to + '.'})
|
||||||
res.redirect('/api/twilio');
|
res.redirect('/api/twilio');
|
||||||
});
|
});
|
||||||
|
@ -7,15 +7,15 @@ block content
|
|||||||
| Twilio API
|
| Twilio API
|
||||||
|
|
||||||
.btn-group.btn-group-justified
|
.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
|
i.fa.fa-check-square-o
|
||||||
| Overview
|
| Twilio Node
|
||||||
a.btn.btn-primary(href='http://prototype.nytimes.com/gst/apitool/index.html', target='_blank')
|
a.btn.btn-primary(href='https://apigee.com/console/twilio', target='_blank')
|
||||||
i.fa.fa-laptop
|
i.fa.fa-laptop
|
||||||
| API Console
|
| 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
|
i.fa.fa-code-fork
|
||||||
| API Endspoints
|
| REST API
|
||||||
|
|
||||||
h4 Send a text message
|
h4 Send a text message
|
||||||
.row
|
.row
|
||||||
|
Reference in New Issue
Block a user