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 <suzhou@amazon.com>
  • Loading branch information
SuZhou-Joe committed Mar 27, 2024
1 parent 46fa35f commit d6e1664
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 d6e1664

Please sign in to comment.