small form improvements and corrections

merge-requests/208/head
fatchan 5 years ago
parent c4243d1f81
commit 956a8693ec
  1. 5
      controllers/forms.js
  2. 2
      models/forms/delete-post.js

@ -161,9 +161,8 @@ router.post('/board/:board/posts', Boards.exists, banCheck, numberConverter, asy
|| req.body.dismiss
|| req.body.spoiler
|| req.body.ban
|| req.body.global_ban
|| req.body.preserve_post)) {
errors.push('Must select an action')
|| req.body.global_ban)) {
errors.push('Invalid actions selected')
}
if (req.body.report && (!req.body.reason || req.body.reason.length === 0)) {
errors.push('Reports must have a reason')

@ -70,6 +70,6 @@ module.exports = async (req, res, next, checkedPosts) => {
}));
//hooray!
return `Deleted ${threadIds.length} threads and ${deletedPosts} posts`
return `Deleted ${threadIds.length} threads and ${deletedPosts-threadIds.length} posts`
}

Loading…
Cancel
Save