@@ -42,15 +42,17 @@ export class CreateUser {
 | 
			
		||||
            }
 | 
			
		||||
            let found_groups = []
 | 
			
		||||
            this.groupId.forEach(async (g) => {
 | 
			
		||||
                const foundGroup = await getConnectionManager().get().getRepository(UserGroup).find({ id: g });
 | 
			
		||||
                if (foundGroup) {
 | 
			
		||||
                const foundGroup = await getConnectionManager().get().getRepository(UserGroup).findOne({ id: g });
 | 
			
		||||
                console.log(foundGroup);
 | 
			
		||||
                found_groups.push(foundGroup)
 | 
			
		||||
                } else {
 | 
			
		||||
                    throw new UserGroupNotFoundError();
 | 
			
		||||
                }
 | 
			
		||||
            });
 | 
			
		||||
            console.log(found_groups);
 | 
			
		||||
            if (found_groups.includes(undefined) || found_groups.includes(null)) {
 | 
			
		||||
                throw new UserGroupNotFoundError();
 | 
			
		||||
            } else {
 | 
			
		||||
                newUser.groups = found_groups
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        const new_uuid = uuid.v4()
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user