-
Notifications
You must be signed in to change notification settings - Fork 0
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
base: master
Are you sure you want to change the base?
Review api #466
Conversation
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.
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", |
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.
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(?,?,?,?,?);"; |
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.
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( |
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.
want to use await
here, and then send response code/message based on the 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.
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", |
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.
also want to remove this
No description provided.