Closed robbyphillips closed 5 years ago
Previous transaction total routes still need to be fixed, but there's a lot of big changes here.
Changes to models/Transaction.js
models/Transaction.js
userId
fromUser
paidUserId
paidUser
commentId
postId
isListokaAcct
txOutputs
commentList
Created scripts/transactionSeed.js and added it to the npm run seed command in package.json
scripts/transactionSeed.js
npm run seed
package.json
createdAt
Added routes and handlers to routes/transactionRouter.js to get all transactions for a given userId.
routes/transactionRouter.js
/users/:userId/tx
/users/:userId/tx/to
/user/:userId/tx/from
/users/:userId/tx?page=2&limit=10
Added helpers to client/src/utils/API.js for the transaction routes
client/src/utils/API.js
Modified ListokaMoneyButton to work with the new Transaction model (pretty sure this is non-breaking for any of our current use-cases)
ListokaMoneyButton
Misc cleanup.
Previous transaction total routes still need to be fixed, but there's a lot of big changes here.
Changes to
models/Transaction.js
userId
field tofromUser
paidUserId
field topaidUser
userId
,commentId
,postId
, andisListokaAcct
totxOutputs
arraycommentList
Created
scripts/transactionSeed.js
and added it to thenpm run seed
command inpackage.json
createdAt
timesAdded routes and handlers to
routes/transactionRouter.js
to get all transactions for a given userId./users/:userId/tx
for both 'to' and 'from' transactions/users/:userId/tx/to
,/user/:userId/tx/from
/users/:userId/tx?page=2&limit=10
Added helpers to
client/src/utils/API.js
for the transaction routesModified
ListokaMoneyButton
to work with the new Transaction model (pretty sure this is non-breaking for any of our current use-cases)Misc cleanup.