-
Notifications
You must be signed in to change notification settings - Fork 59
adding table and api ~ Positions #154
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
nurmerey
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good Shivi! Just a few requests. Plz let me know if something that I asked is not clear!
| } | ||
|
|
||
| router.get("/getPositions", (req, res) => { | ||
| const positions = getPositions(res); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's check if the user is authenticated first here. You can see an example of that from other APIs in this file.
| }); | ||
| }); | ||
|
|
||
| //Positions method |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: space after // and before Positions
| let SQL = 'SELECT * FROM Positions;'; | ||
| return client.query(SQL) | ||
| .then(result => { | ||
| console.log(result); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should probably return rather than console.log?
| async function getAccessToken(code, client_id, client_secret) { | ||
| const result = await axios( | ||
| { | ||
| const result = await axios({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove all automatic formatting like this added to this file that does not directly part of this PR.
|
@ShiviBhatt let me know if you have any questions! It looks like you are very close to finishing the PR! |
Work and Validation of Positions table and API work