latest work #20

Merged
philipp merged 233 commits from dev into main 2020-12-09 18:49:33 +00:00
Showing only changes of commit b101682e3c - Show all commits

View File

@ -37,7 +37,9 @@ export class CreateUser {
} }
if (this.groupId) { if (this.groupId) {
if (Array.isArray(this.groupId)) { if (!Array.isArray(this.groupId)) {
this.groupId = [this.groupId]
}
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).find({ id: g });
@ -48,9 +50,6 @@ export class CreateUser {
} }
}); });
newUser.groups = found_groups newUser.groups = found_groups
} else {
newUser.groups = await getConnectionManager().get().getRepository(UserGroup).find({ id: this.groupId });
}
} }
const new_uuid = uuid.v4() const new_uuid = uuid.v4()