mirror of
https://github.com/bitwarden/jslib
synced 2025-12-21 02:33:37 +00:00
[review] Rename stateService.purge to stateService.clean
This commit is contained in:
@@ -29,7 +29,7 @@ export abstract class StateService {
|
||||
|
||||
addAccount: (account: Account) => Promise<void>;
|
||||
setActiveUser: (userId: string) => Promise<void>;
|
||||
purge: (options?: StorageOptions) => Promise<void>;
|
||||
clean: (options?: StorageOptions) => Promise<void>;
|
||||
|
||||
getAccessToken: (options?: StorageOptions) => Promise<string>;
|
||||
setAccessToken: (value: string, options?: StorageOptions) => Promise<void>;
|
||||
|
||||
@@ -76,7 +76,7 @@ export class StateService implements StateServiceAbstraction {
|
||||
await this.pushAccounts();
|
||||
}
|
||||
|
||||
async purge(options?: StorageOptions): Promise<void> {
|
||||
async clean(options?: StorageOptions): Promise<void> {
|
||||
await this.secureStorageService.remove(options?.userId ?? this.state.activeUserId);
|
||||
await this.storageService.remove(options?.userId ?? this.state.activeUserId);
|
||||
delete this.state.accounts[options?.userId ?? this.state.activeUserId];
|
||||
|
||||
Reference in New Issue
Block a user