fix(Strava Trigger Node): Fix issue with webhook not being deleted (#11226)

This commit is contained in:
Jon
2024-10-14 11:17:19 +01:00
committed by GitHub
parent 4f27b39b45
commit 566529ca11
2 changed files with 6 additions and 7 deletions

View File

@@ -36,14 +36,13 @@ export async function stravaApiRequest(
if (this.getNode().type.includes('Trigger') && resource.includes('/push_subscriptions')) {
const credentials = await this.getCredentials('stravaOAuth2Api');
if (method === 'GET') {
if (method === 'GET' || method === 'DELETE') {
qs.client_id = credentials.clientId;
qs.client_secret = credentials.clientSecret;
} else {
body.client_id = credentials.clientId;
body.client_secret = credentials.clientSecret;
}
return await this.helpers?.request(options);
} else {
return await this.helpers.requestOAuth2.call(this, 'stravaOAuth2Api', options, {