From a5e714f1c46da9abadfaf9151eb652eb2d0b8ee7 Mon Sep 17 00:00:00 2001 From: Omar Ajoue Date: Wed, 6 Oct 2021 20:05:28 +0200 Subject: [PATCH] :bug: Fix the way arrays are serialized for gmail and a few other nodes (#2289) --- packages/core/src/NodeExecuteFunctions.ts | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/packages/core/src/NodeExecuteFunctions.ts b/packages/core/src/NodeExecuteFunctions.ts index 189a2a7dac..2ce225badf 100644 --- a/packages/core/src/NodeExecuteFunctions.ts +++ b/packages/core/src/NodeExecuteFunctions.ts @@ -251,12 +251,23 @@ async function parseRequestObject(requestObject: IDataObject) { axiosConfig.params = requestObject.qs as IDataObject; } - if (requestObject.useQuerystring === true) { + if ( + requestObject.useQuerystring === true || + // @ts-ignore + requestObject.qsStringifyOptions?.arrayFormat === 'repeat' + ) { axiosConfig.paramsSerializer = (params) => { return stringify(params, { arrayFormat: 'repeat' }); }; } + // @ts-ignore + if (requestObject.qsStringifyOptions?.arrayFormat === 'brackets') { + axiosConfig.paramsSerializer = (params) => { + return stringify(params, { arrayFormat: 'brackets' }); + }; + } + if (requestObject.auth !== undefined) { // Check support for sendImmediately if ((requestObject.auth as IDataObject).bearer !== undefined) {