Open PiyushKhurana opened 4 years ago
add check for authorization before deleting comment or answer if (question.author.toString() !== req.user.id) { return res .status(401) .json({ notauthorized: "User not authorized" }); }
if (question.author.toString() !== req.user.id) { return res .status(401) .json({ notauthorized: "User not authorized" }); }
add check for authorization before deleting comment or answer
if (question.author.toString() !== req.user.id) { return res .status(401) .json({ notauthorized: "User not authorized" }); }