mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-25 12:15:18 +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 { Component } from "@angular/core";
|
||||||
import { ActivatedRoute } from "@angular/router";
|
import { ActivatedRoute, Router } from "@angular/router";
|
||||||
|
|
||||||
import { UserVerificationDialogComponent } from "@bitwarden/auth/angular";
|
import { UserVerificationDialogComponent } from "@bitwarden/auth/angular";
|
||||||
import { ApiService } from "@bitwarden/common/abstractions/api.service";
|
import { ApiService } from "@bitwarden/common/abstractions/api.service";
|
||||||
@ -42,6 +42,7 @@ export class AccountComponent {
|
|||||||
private dialogService: DialogService,
|
private dialogService: DialogService,
|
||||||
private configService: ConfigService,
|
private configService: ConfigService,
|
||||||
private providerApiService: ProviderApiServiceAbstraction,
|
private providerApiService: ProviderApiServiceAbstraction,
|
||||||
|
private router: Router,
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
async ngOnInit() {
|
async ngOnInit() {
|
||||||
@ -93,9 +94,8 @@ export class AccountComponent {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.formPromise = this.providerApiService.deleteProvider(this.providerId);
|
|
||||||
try {
|
try {
|
||||||
await this.formPromise;
|
await this.providerApiService.deleteProvider(this.providerId);
|
||||||
this.platformUtilsService.showToast(
|
this.platformUtilsService.showToast(
|
||||||
"success",
|
"success",
|
||||||
this.i18nService.t("providerDeleted"),
|
this.i18nService.t("providerDeleted"),
|
||||||
@ -104,7 +104,8 @@ export class AccountComponent {
|
|||||||
} catch (e) {
|
} catch (e) {
|
||||||
this.logService.error(e);
|
this.logService.error(e);
|
||||||
}
|
}
|
||||||
this.formPromise = null;
|
|
||||||
|
await this.router.navigate(["/"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
private async verifyUser(): Promise<boolean> {
|
private async verifyUser(): Promise<boolean> {
|
||||||
|
Loading…
Reference in New Issue
Block a user