mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
[EDR Workflows] Change Osquery shards schema (#166178)
This commit is contained in:
parent
982b2c86bd
commit
fb5f8e379b
2 changed files with 2 additions and 2 deletions
|
@ -13,7 +13,7 @@ export const createPackRequestBodySchema = t.type({
|
|||
description: t.union([t.string, t.undefined]),
|
||||
enabled: t.union([t.boolean, t.undefined]),
|
||||
policy_ids: t.union([t.array(t.string), t.undefined]),
|
||||
shards: t.record(t.string, toNumberRt),
|
||||
shards: t.union([t.record(t.string, toNumberRt), t.undefined]),
|
||||
queries: t.record(
|
||||
t.string,
|
||||
t.type({
|
||||
|
|
|
@ -67,7 +67,7 @@ export const createPackRoute = (router: IRouter, osqueryContext: OsqueryAppConte
|
|||
const currentUser = await osqueryContext.security.authc.getCurrentUser(request)?.username;
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/naming-convention
|
||||
const { name, description, queries, enabled, policy_ids, shards } = request.body;
|
||||
const { name, description, queries, enabled, policy_ids, shards = {} } = request.body;
|
||||
const conflictingEntries = await savedObjectsClient.find({
|
||||
type: packSavedObjectType,
|
||||
filter: `${packSavedObjectType}.attributes.name: "${name}"`,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue