diff --git a/src/controllers/comments.controller.js b/src/controllers/comments.controller.js index 4f45078..9d5115c 100644 --- a/src/controllers/comments.controller.js +++ b/src/controllers/comments.controller.js @@ -4,13 +4,13 @@ const ErrorResponse = require("../utils/errorResponse"); module.exports.createComment = asyncHandler(async (req, res, next) => { try { - const { slug, title, description, body, authorId } = req.body; + const { slug, title, description, body } = req.body; const comment = await CommentService.createComment({ slug, title, description, body, - authorId + authorId: req.payload.id }); res.status(201).json({