Skip to content

Commit

Permalink
delete the useless code
Browse files Browse the repository at this point in the history
Signed-off-by: yubonluo <yubonluo@amazon.com>
  • Loading branch information
yubonluo committed Jul 8, 2024
1 parent ee00dca commit d7f28ab
Showing 1 changed file with 3 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import {
SavedObjectsCheckConflictsObject,
OpenSearchDashboardsRequest,
SavedObjectsFindOptions,
WORKSPACE_TYPE,
} from '../../../../core/server';

type WorkspaceOptions = Pick<SavedObjectsBaseOptions, 'workspaces'> | undefined;
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit d7f28ab

Please sign in to comment.