Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(Asana Node): Fix issue when connecting to the new Asana environment #8404

Merged
merged 3 commits into from
Jan 22, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion packages/nodes-base/nodes/Asana/GenericFunctions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,16 @@ export async function asanaApiRequest(
method,
body: method === 'GET' || method === 'HEAD' || method === 'DELETE' ? null : { data: body },
qs: query,
url: uri || `https://app.asana.com/api/1.0${endpoint}`,
url:
uri ||
`https://app.asana.com/api/1.0/${endpoint.startsWith('/') ? endpoint.slice(1) : endpoint}`,
Joffcom marked this conversation as resolved.
Show resolved Hide resolved
json: true,
};

if (options.body === null) {
delete options.body;
}

const credentialType = authenticationMethod === 'accessToken' ? 'asanaApi' : 'asanaOAuth2Api';
return await this.helpers.requestWithAuthentication.call(this, credentialType, options);
}
Expand Down
Loading