mirror of
https://github.com/bitwarden/jslib
synced 2025-12-06 00:03:29 +00:00
Simplify logic
This commit is contained in:
@@ -1,7 +1,3 @@
|
||||
export class EncryptedOrganizationKeyData {
|
||||
constructor(public key: string, public providerId?: string) {}
|
||||
|
||||
static fromObj(obj: { key: string; providerId?: string }) {
|
||||
return new EncryptedOrganizationKeyData(obj.key, obj.providerId);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -66,7 +66,7 @@ export class CryptoService implements CryptoServiceAbstraction {
|
||||
|
||||
const allOrgs = orgs.concat(providerOrgs);
|
||||
allOrgs.forEach((org) => {
|
||||
encOrgKeyData[org.id] = EncryptedOrganizationKeyData.fromObj(org);
|
||||
encOrgKeyData[org.id] = new EncryptedOrganizationKeyData(org.key, org.providerId);
|
||||
});
|
||||
|
||||
await this.stateService.setDecryptedOrganizationKeys(null);
|
||||
|
||||
Reference in New Issue
Block a user