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
Also need GET-ALL-CURRENCIES and GET-USER-CURRENCIES, where GET-ALL-CURRENCIES returns all possible currencies in an array response: {currencies: [a,b,c]} and GET-USER-CURRENCIES returns all currencies a user owns and the amount they have response: {a: "200", b: "1", c: "2"}
SQL by default returns an array of JSONs. Hence, in most cases I pass on to the server an array with 1 element which is a JSON of the required information. As a result:
GET-USER-CURRENCIES = getUser(email) will return this: [ RowDataPacket { usd: 950, eur: 30, inr: 70, brl: 500 } ]
Note the currencies are stored as floats.
I can change it to be RowDataPacket { usd: 950, eur: 30, inr: 70, brl: 500 } in 1 line so let me know.
You can either hardcode GET-ALL-CURRENCIES because there are exactly 25 currencies and that will never change OR you can call this amazing function which gives you some cool info.
latestValue()
Please make a verifyJWT route, so I can logout people when it expires/doesn't
The text was updated successfully, but these errors were encountered: