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