Skip to content

Create get a uniq review by - #7

Open
Louishancquart wants to merge 3 commits into
developfrom
create-get-a-uniq-review-by-id
Open

Create get a uniq review by#7
Louishancquart wants to merge 3 commits into
developfrom
create-get-a-uniq-review-by-id

Conversation

@Louishancquart

Copy link
Copy Markdown

add the possibility to to get , create and increase vote of reviews by review id

@kranack
kranack self-requested a review July 30, 2019 08:38
@kranack kranack self-assigned this Jul 30, 2019

@kranack kranack left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Okay for me, no problem for merging these changes 👌

// Increment vote of a review
fastify.post('/:reviewId', async (req, reply) => {
const data = await Review.findByIdAndUpdate(req.params.reviewId , {$inc: {vote: req.body.review.vote}})
req.log.info(' ====== data.vote: ' + data.vote+ " ========")

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

You need to use single-quotes only to comply with standard JS

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

ok Thanks ;)

@kranack kranack added this to the RLTube 1.0 milestone Jul 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants