From 362a0d3876fc7fc9c1b185498444d20c14c3e8d0 Mon Sep 17 00:00:00 2001 From: chrisronline Date: Fri, 6 Aug 2021 13:13:15 -0400 Subject: [PATCH] Remove unnecessary code --- .../encrypted_saved_objects/server/mocks.ts | 1 - .../server/saved_objects/index.ts | 14 -------------- 2 files changed, 15 deletions(-) diff --git a/x-pack/plugins/encrypted_saved_objects/server/mocks.ts b/x-pack/plugins/encrypted_saved_objects/server/mocks.ts index 815f3aa02c4cd..5f80e5bab310f 100644 --- a/x-pack/plugins/encrypted_saved_objects/server/mocks.ts +++ b/x-pack/plugins/encrypted_saved_objects/server/mocks.ts @@ -32,7 +32,6 @@ function createEncryptedSavedObjectsStartMock() { function createEncryptedSavedObjectsClienttMock(opts?: EncryptedSavedObjectsClientOptions) { return { getDecryptedAsInternalUser: jest.fn(), - resolveDecryptedIdAsInternalUser: jest.fn(), } as jest.Mocked; } diff --git a/x-pack/plugins/encrypted_saved_objects/server/saved_objects/index.ts b/x-pack/plugins/encrypted_saved_objects/server/saved_objects/index.ts index b6c6e1020c928..1268113eb19bb 100644 --- a/x-pack/plugins/encrypted_saved_objects/server/saved_objects/index.ts +++ b/x-pack/plugins/encrypted_saved_objects/server/saved_objects/index.ts @@ -43,11 +43,6 @@ export interface EncryptedSavedObjectsClient { id: string, options?: SavedObjectsBaseOptions ) => Promise>; - resolveDecryptedIdAsInternalUser: ( - type: string, - id: string, - options?: SavedObjectsBaseOptions - ) => Promise; } export function setupSavedObjects({ @@ -101,15 +96,6 @@ export function setupSavedObjects({ )) as T, }; }, - resolveDecryptedIdAsInternalUser: async ( - type: string, - id: string, - options?: SavedObjectsBaseOptions - ): Promise => { - const [internalRepository] = await internalRepositoryAndTypeRegistryPromise; - const { saved_object: savedObject } = await internalRepository.resolve(type, id, options); - return savedObject.id; - }, }; }; }