fix(spec): from 6e6a7a8f8a

This commit is contained in:
Julian Lam
2020-11-27 15:51:56 -05:00
parent 88a60473d9
commit acb576662e
2 changed files with 3 additions and 1 deletions

View File

@@ -27,6 +27,8 @@ get:
type: string
sort_lastonline:
type: boolean
userCount:
type: number
showInviteButton:
type: boolean
inviteOnly:

View File

@@ -241,7 +241,7 @@ async function render(req, res, data) {
filterBy.forEach(function (filter) {
data['filterBy_' + validator.escape(String(filter))] = true;
});
data.userCount = await db.getObjectField('global', 'userCount');
data.userCount = parseInt(await db.getObjectField('global', 'userCount'), 10);
if (data.adminInviteOnly) {
data.showInviteButton = await privileges.users.isAdministrator(req.uid);
} else {