mirror of
https://github.com/bitwarden/browser
synced 2025-12-06 00:13:28 +00:00
[PM-26430] Remove Type property from PolicyRequestModel to use route parameter only (#16960)
* Remove Type property from PolicyRequestModel to use route parameter only * Remove PolicyType property from policy update request in auto-confirm edit policy dialog * Run prettier
This commit is contained in:
@@ -234,7 +234,6 @@ export class AutoConfirmPolicyDialogComponent
|
||||
|
||||
private async submitSingleOrg(): Promise<void> {
|
||||
const singleOrgRequest: PolicyRequest = {
|
||||
type: PolicyType.SingleOrg,
|
||||
enabled: true,
|
||||
data: null,
|
||||
};
|
||||
|
||||
@@ -109,7 +109,6 @@ export abstract class BasePolicyEditComponent implements OnInit {
|
||||
}
|
||||
|
||||
const request: PolicyRequest = {
|
||||
type: this.policy.type,
|
||||
enabled: this.enabled.value ?? false,
|
||||
data: this.buildRequestData(),
|
||||
};
|
||||
|
||||
@@ -74,7 +74,6 @@ export class vNextOrganizationDataOwnershipPolicyComponent
|
||||
|
||||
const request: VNextPolicyRequest = {
|
||||
policy: {
|
||||
type: this.policy.type,
|
||||
enabled: this.enabled.value ?? false,
|
||||
data: this.buildRequestData(),
|
||||
},
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
import { PolicyType } from "../../enums";
|
||||
|
||||
export type PolicyRequest = {
|
||||
type: PolicyType;
|
||||
enabled: boolean;
|
||||
data: any;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user