1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-15 07:43:35 +00:00

PS-1620 Move AccountService.delete to Internal (#3687)

* Move AccountService.delete to Internal

* Remove unnecessary promise
This commit is contained in:
Matt Gibson
2022-10-18 16:02:11 -04:00
committed by GitHub
parent dcc0a556a2
commit da0a17a2b6
8 changed files with 61 additions and 44 deletions

View File

@@ -1,7 +1,7 @@
import { Component } from "@angular/core";
import { FormBuilder } from "@angular/forms";
import { AccountService } from "@bitwarden/common/abstractions/account/account.service.abstraction";
import { AccountApiService } from "@bitwarden/common/abstractions/account/account-api.service";
import { I18nService } from "@bitwarden/common/abstractions/i18n.service";
import { LogService } from "@bitwarden/common/abstractions/log.service";
import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service";
@@ -22,14 +22,14 @@ export class DeleteAccountComponent {
private i18nService: I18nService,
private platformUtilsService: PlatformUtilsService,
private formBuilder: FormBuilder,
private accountService: AccountService,
private accountApiService: AccountApiService,
private logService: LogService
) {}
async submit() {
try {
const verification = this.deleteForm.get("verification").value;
this.formPromise = this.accountService.delete(verification);
this.formPromise = this.accountApiService.deleteAccount(verification);
await this.formPromise;
this.platformUtilsService.showToast(
"success",