Skip to content
This repository has been archived by the owner on Jun 17, 2022. It is now read-only.

Commit

Permalink
[bug] Correct storage location of organizations (#580)
Browse files Browse the repository at this point in the history
  • Loading branch information
Addison Beck committed Dec 15, 2021
1 parent 3fc7dd7 commit 512c5c2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions common/src/services/state.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1081,13 +1081,13 @@ export class StateService implements StateServiceAbstraction {
}

async getOrganizations(options?: StorageOptions): Promise<{ [id: string]: OrganizationData; }> {
return (await this.getAccount(this.reconcileOptions(options, this.defaultInMemoryOptions)))?.data?.organizations;
return (await this.getAccount(this.reconcileOptions(options, await this.defaultOnDiskOptions())))?.data?.organizations;
}

async setOrganizations(value: { [id: string]: OrganizationData; }, options?: StorageOptions): Promise<void> {
const account = await this.getAccount(this.reconcileOptions(options, this.defaultInMemoryOptions));
const account = await this.getAccount(this.reconcileOptions(options, await this.defaultOnDiskOptions()));
account.data.organizations = value;
await this.saveAccount(account, this.reconcileOptions(options, this.defaultInMemoryOptions));
await this.saveAccount(account, this.reconcileOptions(options, await this.defaultOnDiskOptions()));
}

async getPasswordGenerationOptions(options?: StorageOptions): Promise<any> {
Expand Down

0 comments on commit 512c5c2

Please sign in to comment.