Skip to content

Conversation

@ShiviBhatt
Copy link

Work and Validation of Positions table and API work

  1. Created Positions Table in psql, validated by running in local psql by adding one record and checking if it inserted correctly.
  2. Created API call used Postman to get the request and response received by the server in the command line, in JSON format.

@nurmerey nurmerey self-requested a review October 14, 2020 01:22
Copy link
Contributor

@nurmerey nurmerey left a 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);
Copy link
Contributor

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
Copy link
Contributor

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);
Copy link
Contributor

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({
Copy link
Contributor

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.

@nurmerey
Copy link
Contributor

@ShiviBhatt let me know if you have any questions! It looks like you are very close to finishing the PR!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants