diff --git a/x-pack/plugins/security_solution/common/endpoint/schema/trusted_apps.ts b/x-pack/plugins/security_solution/common/endpoint/schema/trusted_apps.ts index 6e99db7e1ed0b..4b04f15682777 100644 --- a/x-pack/plugins/security_solution/common/endpoint/schema/trusted_apps.ts +++ b/x-pack/plugins/security_solution/common/endpoint/schema/trusted_apps.ts @@ -124,7 +124,7 @@ const EntriesSchema = schema.conditional( ) ); -const getTrustedAppForOsScheme = (forUpdateFlow: boolean = false) => +const getTrustedAppForOsScheme = () => schema.object({ name: schema.string({ minLength: 1, maxLength: 256 }), description: schema.maybe(schema.string({ minLength: 0, maxLength: 256, defaultValue: '' })), @@ -143,7 +143,7 @@ const getTrustedAppForOsScheme = (forUpdateFlow: boolean = false) => }), ]), entries: EntriesSchema, - ...(forUpdateFlow ? { version: schema.maybe(schema.string()) } : {}), + version: schema.maybe(schema.string()), }); export const PostTrustedAppCreateRequestSchema = { @@ -154,5 +154,5 @@ export const PutTrustedAppUpdateRequestSchema = { params: schema.object({ id: schema.string(), }), - body: getTrustedAppForOsScheme(true), + body: getTrustedAppForOsScheme(), }; diff --git a/x-pack/plugins/security_solution/server/endpoint/routes/trusted_apps/service.ts b/x-pack/plugins/security_solution/server/endpoint/routes/trusted_apps/service.ts index d62c1ecd8c577..7a4b2372ece8f 100644 --- a/x-pack/plugins/security_solution/server/endpoint/routes/trusted_apps/service.ts +++ b/x-pack/plugins/security_solution/server/endpoint/routes/trusted_apps/service.ts @@ -256,10 +256,8 @@ export const updateTrustedApp = async ( try { updatedTrustedAppExceptionItem = await exceptionsListClient.updateExceptionListItem( - // @ts-ignore 4.3.5 upgrade updatedTrustedAppToUpdateExceptionListItemOptions( currentTrustedAppExceptionItem, - // @ts-ignore 4.3.5 upgrade updatedTrustedApp ) );