mirror of
https://github.com/bitwarden/directory-connector
synced 2025-12-22 19:23:22 +00:00
Fix warning when attempting a double login in the cli (#468)
* Replace call to `getEntityType` with a static string * Delete several unused `StateService` methods
This commit is contained in:
@@ -1355,34 +1355,6 @@ export class StateService<
|
||||
)?.profile?.entityId;
|
||||
}
|
||||
|
||||
async setEntityId(value: string, options?: StorageOptions): Promise<void> {
|
||||
const account = await this.getAccount(
|
||||
this.reconcileOptions(options, await this.defaultOnDiskLocalOptions()),
|
||||
);
|
||||
account.profile.entityId = value;
|
||||
await this.saveAccount(
|
||||
account,
|
||||
this.reconcileOptions(options, await this.defaultOnDiskLocalOptions()),
|
||||
);
|
||||
}
|
||||
|
||||
async getEntityType(options?: StorageOptions): Promise<any> {
|
||||
return (
|
||||
await this.getAccount(this.reconcileOptions(options, await this.defaultOnDiskLocalOptions()))
|
||||
)?.profile?.entityType;
|
||||
}
|
||||
|
||||
async setEntityType(value: string, options?: StorageOptions): Promise<void> {
|
||||
const account = await this.getAccount(
|
||||
this.reconcileOptions(options, await this.defaultOnDiskLocalOptions()),
|
||||
);
|
||||
account.profile.entityType = value;
|
||||
await this.saveAccount(
|
||||
account,
|
||||
this.reconcileOptions(options, await this.defaultOnDiskLocalOptions()),
|
||||
);
|
||||
}
|
||||
|
||||
async getEnvironmentUrls(options?: StorageOptions): Promise<EnvironmentUrls> {
|
||||
if (this.state.activeUserId == null) {
|
||||
return await this.getGlobalEnvironmentUrls(options);
|
||||
|
||||
Reference in New Issue
Block a user