refactor: command k and enable workspace level search (#1664)

* refactor: command k and enable workspace level search

* fix: global level search
This commit is contained in:
Aaryan Khandelwal 2023-07-25 13:52:21 +05:30 committed by GitHub
parent c2327fa538
commit c87d70195d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 248 additions and 200 deletions

View file

@ -231,12 +231,15 @@ class WorkspaceService extends APIService {
async searchWorkspace(
workspaceSlug: string,
projectId: string,
query: string
params: {
project_id?: string;
search: string;
workspace_search: boolean;
}
): Promise<IWorkspaceSearchResults> {
return this.get(
`/api/workspaces/${workspaceSlug}/projects/${projectId}/search/?search=${query}`
)
return this.get(`/api/workspaces/${workspaceSlug}/search/`, {
params,
})
.then((res) => res?.data)
.catch((error) => {
throw error?.response?.data;