fix: #227 Fixing array syntax thanks to Lukas Eipert (https://github.com/leipert)

This commit is contained in:
Justin 2019-05-25 18:16:29 -04:00 committed by Justin Dalrymple
parent cea5a2bc5e
commit aa6acb1d18
2 changed files with 2 additions and 2 deletions

View File

@ -31,7 +31,7 @@ function defaultRequest(
{
timeout: 30000,
headers,
searchParams: stringify(decamelizeKeys(query || {}), { arrayFormat: 'bracket' }),
searchParams: stringify(decamelizeKeys(query), { arrayFormat: 'bracket' }),
prefixUrl: service.url,
json: typeof body === 'object' ? decamelizeKeys(body, skipAllCaps) : body,
rejectUnauthorized: service.rejectUnauthorized,

View File

@ -9,7 +9,7 @@ export async function get(
): Promise<GetResponse> {
const { showPagination, maxPages, sudo, ...query } = options;
const response = await service.requester.get(service, endpoint, {
query,
query: query || {},
sudo,
});
const { headers } = response;