akshatjain0027 / dap-project

2 stars 0 forks source link

add check for authorization #35

Open PiyushKhurana opened 4 years ago

PiyushKhurana commented 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" }); }