mirror of
https://github.com/docmost/docmost.git
synced 2025-11-16 05:51:13 +10:00
return early if userIds is empty
This commit is contained in:
@ -47,6 +47,8 @@ export class GroupUserService {
|
|||||||
const db = dbOrTx(this.db, trx);
|
const db = dbOrTx(this.db, trx);
|
||||||
await this.groupService.findAndValidateGroup(groupId, workspaceId, trx);
|
await this.groupService.findAndValidateGroup(groupId, workspaceId, trx);
|
||||||
|
|
||||||
|
if (userIds.length === 0) return;
|
||||||
|
|
||||||
// make sure we have valid workspace users
|
// make sure we have valid workspace users
|
||||||
const validUsers = await db
|
const validUsers = await db
|
||||||
.selectFrom('users')
|
.selectFrom('users')
|
||||||
|
|||||||
Reference in New Issue
Block a user