mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46:12 +01:00
fix: bad logic in group assertion middleware
This commit is contained in:
@@ -22,7 +22,7 @@ module.exports = function (middleware) {
|
||||
|
||||
middleware.assertGroup = async (req, res, next) => {
|
||||
const name = await groups.getGroupNameByGroupSlug(req.params.slug);
|
||||
if (!name || await groups.exists(name)) {
|
||||
if (!name || !await groups.exists(name)) {
|
||||
return helpers.formatApiResponse(404, res, new Error('[[error:no-group]]'));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user