Skip to content

Commit

Permalink
Fixed typo and added payment.target.user to recentPayments table in c…
Browse files Browse the repository at this point in the history
…ase User ID was used instead of email or phone # to send a payment
  • Loading branch information
sahat committed Feb 11, 2014
1 parent de6e6ab commit a0150ac
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion controllers/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);

});
}
},
Expand All @@ -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();

Expand Down
6 changes: 3 additions & 3 deletions views/api/venmo.jade
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit a0150ac

Please sign in to comment.