fix: bad logic in group assertion middleware

v1.18.x
Julian Lam 4 years ago
parent 8e7baac6ef
commit 8e89f34dbf

@ -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]]'));
}

Loading…
Cancel
Save