From c5a73443d677fa9d5240ca4afa7c38e6917377b1 Mon Sep 17 00:00:00 2001 From: Sahat Yalkabov Date: Tue, 11 Feb 2014 08:14:50 -0500 Subject: [PATCH] Fixed typo and added payment.target.user to recentPayments table in case User ID was used instead of email or phone # to send a payment --- controllers/api.js | 3 ++- views/api/venmo.jade | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/controllers/api.js b/controllers/api.js index b66a9629df..1fb3b2e4cf 100644 --- a/controllers/api.js +++ b/controllers/api.js @@ -428,6 +428,7 @@ exports.getVenmo = function(req, res, next) { getRecentPayments: function(done) { request.get({ url: 'https://api.venmo.com/v1/payments?' + query, json: true }, function(err, request, body) { done(err, body); + }); } }, @@ -444,7 +445,7 @@ exports.getVenmo = function(req, res, next) { exports.postVenmo = function(req, res, next) { req.assert('user', 'Phone, Email or Venmo User ID cannot be blank').notEmpty(); req.assert('note', 'Please enter a message to accompany the payment').notEmpty(); - req.assert('amount', 'They amount you want to pay cannot be blank').notEmpty(); + req.assert('amount', 'The amount you want to pay cannot be blank').notEmpty(); var errors = req.validationErrors(); diff --git a/views/api/venmo.jade b/views/api/venmo.jade index 3bdfb2dbb0..7cd111ef22 100644 --- a/views/api/venmo.jade +++ b/views/api/venmo.jade @@ -61,7 +61,7 @@ block content br h3 Recent Payments - table.table.table-striped.table-bordered + table.table.table-striped.table-condensed.table-bordered thead tr th To @@ -73,8 +73,8 @@ block content if recentPayments.length for payment in recentPayments tr - td= payment.target.phone || payment.target.email - td= payment.amount + td= payment.target.phone || payment.target.email || payment.target.user + td $#{payment.amount} td= payment.status td= payment.date_created td= payment.note