mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-03-06 12:31:33 +01:00
refactor: use groupslug:groupname for search and acp page
dont need to load all names which includes privilege groups
This commit is contained in:
@@ -62,14 +62,13 @@ groupsController.get = async function (req, res, next) {
|
||||
};
|
||||
|
||||
async function getGroupNames() {
|
||||
const groupNames = await db.getSortedSetRange('groups:createtime', 0, -1);
|
||||
const groupNames = Object.values(await db.getObject('groupslug:groupname'));
|
||||
return groupNames.filter(name => (
|
||||
name !== 'registered-users' &&
|
||||
name !== 'verified-users' &&
|
||||
name !== 'unverified-users' &&
|
||||
name !== groups.BANNED_USERS &&
|
||||
!groups.isPrivilegeGroup(name)
|
||||
));
|
||||
name !== groups.BANNED_USERS
|
||||
)).sort((a, b) => a.toLowerCase().localeCompare(b.toLowerCase()));
|
||||
}
|
||||
|
||||
groupsController.getCSV = async function (req, res) {
|
||||
|
||||
Reference in New Issue
Block a user