From 2f859c6089b935e41bba3b90f79d73dd323257f8 Mon Sep 17 00:00:00 2001 From: Lukas Eipert Date: Sun, 28 Oct 2018 23:40:28 +0100 Subject: [PATCH 1/2] Fix array syntax to brackets --- src/infrastructure/RequestHelper.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/infrastructure/RequestHelper.ts b/src/infrastructure/RequestHelper.ts index d060ac0a0..fab597c44 100644 --- a/src/infrastructure/RequestHelper.ts +++ b/src/infrastructure/RequestHelper.ts @@ -10,6 +10,7 @@ interface RequestParametersInput { json?: boolean; body?: Object; qs?: Object; + qsStringifyOptions? : Object; formData?: temporaryAny; resolveWithFullResponse?: boolean; rejectUnauthorized?: boolean; @@ -44,9 +45,10 @@ function defaultRequest( if (qs) { if (useXMLHttpRequest) { // The xhr package doesn't have a way of passing in a qs object until v3 - params.url = URLJoin(params.url, `?${QS.stringify(Humps.decamelizeKeys(qs))}`); + params.url = URLJoin(params.url, `?${QS.stringify(Humps.decamelizeKeys(qs), { arrayFormat: 'brackets' })}`); } else { params.qs = Humps.decamelizeKeys(qs); + params.qsStringifyOptions = { arrayFormat: 'brackets' }; } } From dececa6bd1cf10ead8b0d019e1c463225ec5b385 Mon Sep 17 00:00:00 2001 From: Justin Dalrymple Date: Mon, 29 Oct 2018 09:55:08 -0400 Subject: [PATCH 2/2] fix: Updating application settings test to match updated API --- test/tests/services/ApplicationSettings.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/test/tests/services/ApplicationSettings.ts b/test/tests/services/ApplicationSettings.ts index b020222b3..10eeb7a88 100644 --- a/test/tests/services/ApplicationSettings.ts +++ b/test/tests/services/ApplicationSettings.ts @@ -108,9 +108,6 @@ describe('ApplicationSettings.all', () => { 'session_expire_delay', 'shared_runners_enabled', 'shared_runners_text', - 'sidekiq_throttling_enabled', - 'sidekiq_throttling_factor', - 'sidekiq_throttling_queues', 'sign_in_text', 'signup_enabled', 'terminal_max_session_time', @@ -136,6 +133,7 @@ describe('ApplicationSettings.all', () => { 'user_oauth_applications', 'version_check_enabled', 'web_ide_clientside_preview_enabled', + 'diff_max_patch_bytes', 'password_authentication_enabled', 'signin_enabled', ]);