mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-05-07 06:07:28 +02:00
chore: eslint prefer-destructuring
This commit is contained in:
committed by
Julian Lam
parent
8d1462ffd8
commit
23f212a4c0
@@ -182,7 +182,7 @@ Users.invite = async (req, res) => {
|
||||
return helpers.formatApiResponse(403, res, new Error('[[error:no-privileges]]'));
|
||||
}
|
||||
|
||||
const registrationType = meta.config.registrationType;
|
||||
const { registrationType } = meta.config;
|
||||
const isAdmin = await user.isAdministrator(req.uid);
|
||||
if (registrationType === 'admin-invite-only' && !isAdmin) {
|
||||
return helpers.formatApiResponse(403, res, new Error('[[error:no-privileges]]'));
|
||||
|
||||
Reference in New Issue
Block a user