From 940cba8837c6fe94719cf5d4e4416eafe2bfaedd Mon Sep 17 00:00:00 2001 From: fatchan Date: Fri, 24 Apr 2020 12:37:37 +0200 Subject: [PATCH] bugfix report bans --- controllers/forms/actions.js | 2 ++ controllers/forms/globalactions.js | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/controllers/forms/actions.js b/controllers/forms/actions.js index c1888b46..38d8e8d7 100644 --- a/controllers/forms/actions.js +++ b/controllers/forms/actions.js @@ -27,6 +27,8 @@ module.exports = async (req, res, next) => { //50 because checked posts is max 10 and 5 reports max per post errors.push('Cannot check more than 50 reports'); } + } else if (!req.body.checkedreports && req.body.report_ban) { + errors.push('Must select posts+reports to report ban'); } res.locals.actions = actionChecker(req); diff --git a/controllers/forms/globalactions.js b/controllers/forms/globalactions.js index c177a824..56274ba0 100644 --- a/controllers/forms/globalactions.js +++ b/controllers/forms/globalactions.js @@ -24,7 +24,9 @@ module.exports = async (req, res, next) => { //50 because checked posts is max 10 and 5 reports max per post errors.push('Cannot check more than 50 reports'); } - } + } else if (!req.body.checkedreports && req.body.global_report_ban) { + errors.push('Must select posts+reports to report ban'); + } res.locals.actions = actionChecker(req);