refactor ban messaging; add ban duration to message; use bootbox instead of alert

This commit is contained in:
psychobunny
2017-05-05 19:31:49 -04:00
parent 76a2b4800b
commit b3bd70235a
5 changed files with 28 additions and 17 deletions

View File

@@ -105,7 +105,7 @@ module.exports = function (middleware) {
function (results, next) {
if (results.banned) {
req.logout();
return res.redirect('/?banned=' + (results.banReason || 'no-reason'));
return res.redirect('/');
}
results.user.isAdmin = results.isAdmin;