From c281c3efd9082521c16368c686d2c34c95c79bcf Mon Sep 17 00:00:00 2001 From: SuZhou-Joe Date: Mon, 11 Sep 2023 14:38:31 +0800 Subject: [PATCH] feat: make bootstrap run Signed-off-by: SuZhou-Joe --- .../saved_objects/saved_objects_client.ts | 20 ++++++++++--------- .../service/lib/repository.mock.ts | 2 -- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/core/public/saved_objects/saved_objects_client.ts b/src/core/public/saved_objects/saved_objects_client.ts index 2f389b851de2..f1f3b87c6dc7 100644 --- a/src/core/public/saved_objects/saved_objects_client.ts +++ b/src/core/public/saved_objects/saved_objects_client.ts @@ -373,7 +373,6 @@ export class SavedObjectsClient { namespaces: 'namespaces', preference: 'preference', workspaces: 'workspaces', - queryDSL: 'queryDSL', }; const currentWorkspaceId = this._getCurrentWorkspace(); @@ -384,14 +383,17 @@ export class SavedObjectsClient { finalWorkspaces = Array.from(new Set([currentWorkspaceId])); } - const renamedQuery = renameKeys(renameMap, { - ...options, - ...(finalWorkspaces - ? { - workspaces: finalWorkspaces, - } - : {}), - }); + const renamedQuery = renameKeys, any>( + renameMap, + { + ...options, + ...(finalWorkspaces + ? { + workspaces: finalWorkspaces, + } + : {}), + } + ); const query = pick.apply(null, [renamedQuery, ...Object.values(renameMap)]) as Partial< Record >; diff --git a/src/core/server/saved_objects/service/lib/repository.mock.ts b/src/core/server/saved_objects/service/lib/repository.mock.ts index 4c535b18b5f2..e02d4dd0b638 100644 --- a/src/core/server/saved_objects/service/lib/repository.mock.ts +++ b/src/core/server/saved_objects/service/lib/repository.mock.ts @@ -45,8 +45,6 @@ const create = (): jest.Mocked => ({ deleteByNamespace: jest.fn(), incrementCounter: jest.fn(), addToWorkspaces: jest.fn(), - getPermissionQuery: jest.fn(), - processFindOptions: jest.fn(), deleteByWorkspace: jest.fn(), deleteFromWorkspaces: jest.fn(), });