Skip to content

Commit

Permalink
Merge 144e8d7 into ae90a99
Browse files Browse the repository at this point in the history
  • Loading branch information
rwajon committed Aug 5, 2019
2 parents ae90a99 + 144e8d7 commit 07c3464
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/controllers/ReportController.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ export default class ReportController {
* @returns {object} a response to the client
*/
static async deleteSingle(req, res) {
const { articleSlug, reportId } = req.params;
const deleteSingle = await report.remove({ articleSlug, id: reportId });
const { reportId } = req.params;
const deleteSingle = await report.remove({ id: reportId });
return res
.status(status.OK)
.json({ message: 'Report deleted Successfully', report: deleteSingle, reportId });
Expand Down
1 change: 0 additions & 1 deletion src/routes/api/reports.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ router.get(
router.delete(
'/:articleSlug/report/:reportId',
verifyToken,
checkArticle,
checkReportExist,
asyncHandler(ReportController.deleteSingle)
);
Expand Down

0 comments on commit 07c3464

Please sign in to comment.