Review api - #466
Open
nb2k-o wants to merge 2 commits into
Open
Conversation
erin2722
suggested changes
Jan 9, 2022
erin2722
left a comment
Contributor
There was a problem hiding this comment.
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", |
Contributor
There was a problem hiding this comment.
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(?,?,?,?,?);"; |
Contributor
There was a problem hiding this comment.
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( |
Contributor
There was a problem hiding this comment.
want to use await here, and then send response code/message based on the result
Contributor
There was a problem hiding this comment.
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", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.