Skip to content

Commit

Permalink
feat: declare workspaces as null
Browse files Browse the repository at this point in the history
Signed-off-by: SuZhou-Joe <[email protected]>
  • Loading branch information
SuZhou-Joe committed Mar 27, 2024
1 parent 11d5d31 commit 655a6ad
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/core/server/saved_objects/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ export interface SavedObjectsFindOptions {
/** An optional OpenSearch preference value to be used for the query **/
preference?: string;
/** If specified, will only retrieve objects that are in the workspaces */
workspaces?: string[];
workspaces?: string[] | null;
/** By default the operator will be 'AND' */
workspacesSearchOperator?: 'AND' | 'OR';
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -468,9 +468,9 @@ export class WorkspaceSavedObjectsClientWrapper {
[WorkspacePermissionMode.LibraryRead, WorkspacePermissionMode.LibraryWrite]
),
},
// By declaring workspaces as empty array,
// By declaring workspaces as null,
// workspaces won't be appended automatically into the options.
workspaces: [],
workspaces: null,
})
).saved_objects.map((item) => item.id);

Expand Down

0 comments on commit 655a6ad

Please sign in to comment.