Added block and unblock button to profile dropdown menu, #6560

This commit is contained in:
Julian Lam
2018-07-05 14:18:29 -04:00
parent a34584e8f5
commit 7a53fa9469
6 changed files with 38 additions and 16 deletions

View File

@@ -223,16 +223,4 @@ module.exports = function (middleware) {
return next();
}
};
middleware.handleBlocking = function (req, res, next) {
user.blocks.is(res.locals.uid, req.uid, function (err, blocked) {
if (err) {
return next(err);
} else if (blocked) {
res.status(404).render('404', { title: '[[global:404.title]]' });
} else {
return next();
}
});
};
};