mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-21 11:35:34 +01:00
resolve the issue (#9000)
This commit is contained in:
parent
4b42ff7171
commit
66d9ec19a3
@ -1,5 +1,5 @@
|
||||
import { Component } from "@angular/core";
|
||||
import { ActivatedRoute } from "@angular/router";
|
||||
import { ActivatedRoute, Router } from "@angular/router";
|
||||
|
||||
import { UserVerificationDialogComponent } from "@bitwarden/auth/angular";
|
||||
import { ApiService } from "@bitwarden/common/abstractions/api.service";
|
||||
@ -42,6 +42,7 @@ export class AccountComponent {
|
||||
private dialogService: DialogService,
|
||||
private configService: ConfigService,
|
||||
private providerApiService: ProviderApiServiceAbstraction,
|
||||
private router: Router,
|
||||
) {}
|
||||
|
||||
async ngOnInit() {
|
||||
@ -93,9 +94,8 @@ export class AccountComponent {
|
||||
return;
|
||||
}
|
||||
|
||||
this.formPromise = this.providerApiService.deleteProvider(this.providerId);
|
||||
try {
|
||||
await this.formPromise;
|
||||
await this.providerApiService.deleteProvider(this.providerId);
|
||||
this.platformUtilsService.showToast(
|
||||
"success",
|
||||
this.i18nService.t("providerDeleted"),
|
||||
@ -104,7 +104,8 @@ export class AccountComponent {
|
||||
} catch (e) {
|
||||
this.logService.error(e);
|
||||
}
|
||||
this.formPromise = null;
|
||||
|
||||
await this.router.navigate(["/"]);
|
||||
}
|
||||
|
||||
private async verifyUser(): Promise<boolean> {
|
||||
|
Loading…
Reference in New Issue
Block a user