You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not sure if this is an issue, but in the Transactions controller method addTransaction you destructure req.body into text and amount, however in the call to mongoose use the original req.body.
Should the call to mongoose not use the destructured values instead?
Keep up the good work.
The text was updated successfully, but these errors were encountered:
sjscymru
changed the title
Destructured Values in Transactions Controller
Destructured Values not used in Transactions Controller
Mar 2, 2020
Actually in addTransaction he destructures text and amount of req.body but never uses either text or amount. So in fact in this example the destructuring is useless and not needed at all.
Hi Brad,
Great video as always.
I'm not sure if this is an issue, but in the Transactions controller method
addTransaction
you destructurereq.body
intotext
andamount
, however in the call to mongoose use the originalreq.body
.Should the call to mongoose not use the destructured values instead?
Keep up the good work.
The text was updated successfully, but these errors were encountered: