mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
refactor: migrate away from querystring (#4180)
refactor: migrate away from querystring
This commit is contained in:
@@ -11,8 +11,6 @@ import { IDataObject, NodeApiError, NodeOperationError } from 'n8n-workflow';
|
||||
|
||||
import { get } from 'lodash';
|
||||
|
||||
import querystring from 'querystring';
|
||||
|
||||
export async function travisciApiRequest(
|
||||
this: IHookFunctions | IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions,
|
||||
method: string,
|
||||
@@ -71,7 +69,8 @@ export async function travisciApiRequestAllItems(
|
||||
responseData = await travisciApiRequest.call(this, method, resource, body, query);
|
||||
const path = get(responseData, '@pagination.next.@href');
|
||||
if (path !== undefined) {
|
||||
query = querystring.parse(path);
|
||||
const parsedPath = new URLSearchParams(path);
|
||||
query = Object.fromEntries(parsedPath);
|
||||
}
|
||||
returnData.push.apply(returnData, responseData[propertyName]);
|
||||
} while (responseData['@pagination']['is_last'] !== true);
|
||||
|
||||
Reference in New Issue
Block a user