From aec3807d348c03c9a4f872684caf10f5d65f784b Mon Sep 17 00:00:00 2001 From: Sahat Yalkabov Date: Thu, 6 Feb 2014 08:33:37 -0500 Subject: [PATCH] Updated docs button group on Twilio page. Pass err.message instead of error object to the middleware. --- controllers/api.js | 2 +- views/api/twilio.jade | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/controllers/api.js b/controllers/api.js index 6b7de0ccf5..dbccef89a2 100644 --- a/controllers/api.js +++ b/controllers/api.js @@ -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'); }); diff --git a/views/api/twilio.jade b/views/api/twilio.jade index 9d4be997fe..af529ed103 100644 --- a/views/api/twilio.jade +++ b/views/api/twilio.jade @@ -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