From a234a11eee4cf4adcf5313bd129ae12a7a5f1bec Mon Sep 17 00:00:00 2001 From: Chase Date: Tue, 19 Nov 2024 15:45:48 -0700 Subject: [PATCH] Fix query parameters for array values We were creating a new snakeCaseKey=item for each item in the value array. This was creating multiple instances of the snakeCaseKey query param if there is more than one item in an array. --- src/apiClient.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/apiClient.ts b/src/apiClient.ts index 408c14d1..1e118b3b 100644 --- a/src/apiClient.ts +++ b/src/apiClient.ts @@ -106,9 +106,7 @@ export default class APIClient { } url.searchParams.set('metadata_pair', metadataPair.join(',')); } else if (Array.isArray(value)) { - for (const item of value) { - url.searchParams.append(snakeCaseKey, item as string); - } + url.searchParams.append(snakeCaseKey, value.join(',')); } else if (typeof value === 'object') { for (const item in value) { url.searchParams.append(