mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-22 11:45:59 +01:00
Remove appApiAction directive, remove Promise (#11557)
This commit is contained in:
parent
fcf52638c9
commit
cdd5bd4387
@ -1,4 +1,4 @@
|
||||
<form [formGroup]="formGroup" [bitSubmit]="submit" [appApiAction]="formPromise">
|
||||
<form [formGroup]="formGroup" [bitSubmit]="submit">
|
||||
<bit-dialog [loading]="loading" [title]="'editPolicy' | i18n" [subtitle]="policy.name | i18n">
|
||||
<ng-container bitDialogContent>
|
||||
<div *ngIf="loading">
|
||||
|
@ -42,7 +42,6 @@ export class PolicyEditComponent implements AfterViewInit {
|
||||
policyType = PolicyType;
|
||||
loading = true;
|
||||
enabled = false;
|
||||
formPromise: Promise<any>;
|
||||
defaultTypes: any[];
|
||||
policyComponent: BasePolicyComponent;
|
||||
|
||||
@ -99,12 +98,7 @@ export class PolicyEditComponent implements AfterViewInit {
|
||||
this.toastService.showToast({ variant: "error", title: null, message: e.message });
|
||||
return;
|
||||
}
|
||||
this.formPromise = this.policyApiService.putPolicy(
|
||||
this.data.organizationId,
|
||||
this.data.policy.type,
|
||||
request,
|
||||
);
|
||||
await this.formPromise;
|
||||
await this.policyApiService.putPolicy(this.data.organizationId, this.data.policy.type, request);
|
||||
this.toastService.showToast({
|
||||
variant: "success",
|
||||
title: null,
|
||||
|
Loading…
Reference in New Issue
Block a user