Skip to content

Commit

Permalink
Merge 7b77abf into ae90a99
Browse files Browse the repository at this point in the history
  • Loading branch information
MBenedicte committed Aug 5, 2019
2 parents ae90a99 + 7b77abf commit 20dc937
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/controllers/CommentLikeController.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,10 @@ export default class CommentLikeController {
* @returns {object} the return after liking a particular article
*/
static async getAll(req, res) {
const { articleSlug } = req.params;
const findAllLikes = await comment.getAllLikes({ articleSlug });
const { articleSlug, commentId } = req.params;
const findAllLikes = await comment.getAllLikes({ articleSlug, commentId });
return res.status(status.OK).json({
commentId,
likes: findAllLikes.length,
whoLiked: { userId: findAllLikes.map(value => value.userId) }
});
Expand Down

0 comments on commit 20dc937

Please sign in to comment.