Skip to content
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

Review api #466

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Review api #466

wants to merge 2 commits into from

Conversation

nb2k-o
Copy link
Contributor

@nb2k-o nb2k-o commented May 22, 2021

No description provided.

@nb2k-o nb2k-o linked an issue May 22, 2021 that may be closed by this pull request
@nb2k-o nb2k-o removed a link to an issue May 22, 2021
@nb2k-o nb2k-o linked an issue Jun 4, 2021 that may be closed by this pull request
Copy link
Contributor

@erin2722 erin2722 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably want to run a few more tests w EM and also remove secrets before merging

user: process.env.SHAFTUSER,
password: process.env.SHAFTPASSWORD,
database: process.env.SHAFTDATABASE
host: "192.34.62.10",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will need to remove this file from commit before merging to master

router.post('/', (req,res) =>{

const review = req.body
var sql = "INSERT INTO review_distinct (DORM,ROOM_NUM,YEAR,NUM_STARS,REVIEW_TXT) VALUES(?,?,?,?,?);";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can replace ? with ${review.dorm}, etc which should be sent from frontend

const review = req.body
var sql = "INSERT INTO review_distinct (DORM,ROOM_NUM,YEAR,NUM_STARS,REVIEW_TXT) VALUES(?,?,?,?,?);";

pool.query(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

want to use await here, and then send response code/message based on the result

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unless the ? + array syntax is j something i am unfamiliar with (likely), and in that case this is totally fine

user: process.env.SHAFTUSER,
password: process.env.SHAFTPASSWORD,
database: process.env.SHAFTDATABASE
host: "192.34.62.10",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also want to remove this

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.

Submit Review Page (Backend)
2 participants