Skip to content

Commit

Permalink
Fix search with POST method (#524)
Browse files Browse the repository at this point in the history
Send all search options
  • Loading branch information
mpellerin42 authored Jan 23, 2023
1 parent afffb23 commit 55fb2b5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libs/sdk-core/src/lib/db/search/search.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export const search = (

const searchMethod = useGet
? nuclia.rest.get<Search.Results | { detail: string }>(`${path}/search?${serialize(params, others)}`)
: nuclia.rest.post<Search.Results | { detail: string }>(`${path}/search`, params);
: nuclia.rest.post<Search.Results | { detail: string }>(`${path}/search`, { ...params, ...others });
return searchMethod.pipe(
catchError(() => of({ error: true } as Search.Results)),
map((res) => (Object.keys(res).includes('detail') ? ({ error: true } as Search.Results) : (res as Search.Results))),
Expand Down

0 comments on commit 55fb2b5

Please sign in to comment.