more minor refactoring

This commit is contained in:
Martin Kleinschrodt 2022-04-11 18:02:22 +02:00
parent 80419a00f6
commit 43dd7d40f7
1 changed files with 3 additions and 3 deletions

View File

@ -289,9 +289,9 @@ export class BasicProvisioner implements Provisioner {
newOwner: { email: string; id: AccountID }
) {
const [orgProv, prevOwnerProv, newOwnerProv] = await Promise.all([
this.storage.get(OrgProvisioning, id),
this.storage.get(AccountProvisioning, await getIdFromEmail(prevOwner.email)),
this.storage.get(AccountProvisioning, await getIdFromEmail(newOwner.email)),
this._getOrCreateOrgProvisioning(id),
this._getOrCreateAccountProvisioning(prevOwner),
this._getOrCreateAccountProvisioning(newOwner),
]);
if (newOwnerProv.orgs.length) {