Skip to content

Review api - #466

Open
nb2k-o wants to merge 2 commits into
masterfrom
review-api
Open

Review api#466
nb2k-o wants to merge 2 commits into
masterfrom
review-api

Conversation

@nb2k-o

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

Copy link
Copy Markdown
Contributor

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

@erin2722 erin2722 left a comment

Copy link
Copy Markdown
Contributor

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

Comment thread src/server/database.js
user: process.env.SHAFTUSER,
password: process.env.SHAFTPASSWORD,
database: process.env.SHAFTDATABASE
host: "192.34.62.10",

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