mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-20 19:32:15 +00:00
fix(Asana Node): Fix issue when connecting to the new Asana environment (#8404)
This commit is contained in:
@@ -17,7 +17,7 @@ import get from 'lodash/get';
|
||||
export async function asanaApiRequest(
|
||||
this: IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions,
|
||||
method: IHttpRequestMethods,
|
||||
endpoint: string,
|
||||
endpoint: `/${string}`,
|
||||
body: object,
|
||||
query?: IDataObject,
|
||||
uri?: string | undefined,
|
||||
@@ -33,6 +33,10 @@ export async function asanaApiRequest(
|
||||
json: true,
|
||||
};
|
||||
|
||||
if (options.body === null) {
|
||||
delete options.body;
|
||||
}
|
||||
|
||||
const credentialType = authenticationMethod === 'accessToken' ? 'asanaApi' : 'asanaOAuth2Api';
|
||||
return await this.helpers.requestWithAuthentication.call(this, credentialType, options);
|
||||
}
|
||||
@@ -40,8 +44,7 @@ export async function asanaApiRequest(
|
||||
export async function asanaApiRequestAllItems(
|
||||
this: IExecuteFunctions | ILoadOptionsFunctions,
|
||||
method: IHttpRequestMethods,
|
||||
endpoint: string,
|
||||
|
||||
endpoint: `/${string}`,
|
||||
body: any = {},
|
||||
query: IDataObject = {},
|
||||
): Promise<any> {
|
||||
|
||||
Reference in New Issue
Block a user