Get user groups, allow missing.

This commit is contained in:
mike12345567 2025-03-04 18:06:20 +00:00
parent a7c7a94760
commit 4ff338f655
1 changed files with 2 additions and 4 deletions

View File

@ -25,10 +25,8 @@ export async function creatorsInList(
users.filter(user => user.userGroups).flatMap(user => user.userGroups!)
),
]
if (groupIds.length) {
const db = context.getGlobalDB()
groups = await db.getMultiple<UserGroup>(groupIds)
}
const db = context.getGlobalDB()
groups = await db.getMultiple<UserGroup>(groupIds, { allowMissing: true })
return users.map(user => isCreatorSync(user, groups))
}