1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-10-22 07:50:04 +02:00

Remove appApiAction directive, remove Promise (#11557)

This commit is contained in:
Brandon Treston 2024-10-18 09:40:58 -04:00 committed by GitHub
parent fcf52638c9
commit cdd5bd4387
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 8 deletions

View File

@ -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">

View File

@ -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,