From d7f28ab8d93a85bc805264ef5615e01b9d532403 Mon Sep 17 00:00:00 2001 From: yubonluo Date: Mon, 8 Jul 2024 12:02:06 +0800 Subject: [PATCH] delete the useless code Signed-off-by: yubonluo --- .../saved_objects/workspace_id_consumer_wrapper.ts | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/src/plugins/workspace/server/saved_objects/workspace_id_consumer_wrapper.ts b/src/plugins/workspace/server/saved_objects/workspace_id_consumer_wrapper.ts index 50a42be103c0..1f9e196d1f49 100644 --- a/src/plugins/workspace/server/saved_objects/workspace_id_consumer_wrapper.ts +++ b/src/plugins/workspace/server/saved_objects/workspace_id_consumer_wrapper.ts @@ -12,7 +12,6 @@ import { SavedObjectsCheckConflictsObject, OpenSearchDashboardsRequest, SavedObjectsFindOptions, - WORKSPACE_TYPE, } from '../../../../core/server'; type WorkspaceOptions = Pick | undefined; @@ -40,14 +39,6 @@ export class WorkspaceIdConsumerWrapper { }; } - private isWorkspaceType(type: SavedObjectsFindOptions['type']): boolean { - if (Array.isArray(type)) { - return type.every((item) => item === WORKSPACE_TYPE); - } - - return type === WORKSPACE_TYPE; - } - public wrapperFactory: SavedObjectsClientWrapperFactory = (wrapperOptions) => { return { ...wrapperOptions.client, @@ -75,8 +66,9 @@ export class WorkspaceIdConsumerWrapper { ), delete: wrapperOptions.client.delete, find: (options: SavedObjectsFindOptions) => { - const findOptions = this.formatWorkspaceIdParams(wrapperOptions.request, options); - return wrapperOptions.client.find(findOptions); + return wrapperOptions.client.find( + this.formatWorkspaceIdParams(wrapperOptions.request, options) + ); }, bulkGet: wrapperOptions.client.bulkGet, get: wrapperOptions.client.get,