Skip to content

Commit 5603482

Browse files
authored
Types: move query keys to body (#1693)
1 parent ba29559 commit 5603482

File tree

4 files changed

+74
-176
lines changed

4 files changed

+74
-176
lines changed

src/api/api/async_search.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,8 @@ export default class AsyncSearch {
130130
if (acceptedBody.includes(key)) {
131131
body = body ?? {}
132132
// @ts-expect-error
133-
if (key === 'sort' && typeof params[key] === 'string' && params[key].includes(':')) {
133+
if (key === 'sort' && typeof params[key] === 'string' && params[key].includes(':')) { // eslint-disable-line
134+
// @ts-expect-error
134135
querystring[key] = params[key]
135136
} else {
136137
// @ts-expect-error

src/api/api/search.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@ export default async function SearchApi<TDocument = unknown, TAggregations = Rec
5858
if (acceptedBody.includes(key)) {
5959
body = body ?? {}
6060
// @ts-expect-error
61-
if (key === 'sort' && typeof params[key] === 'string' && params[key].includes(':')) {
61+
if (key === 'sort' && typeof params[key] === 'string' && params[key].includes(':')) { // eslint-disable-line
62+
// @ts-expect-error
6263
querystring[key] = params[key]
6364
} else {
6465
// @ts-expect-error

0 commit comments

Comments
 (0)