mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
✨ Add support for suspended tickets to Zendesk node (#2297)
* Added Suspended Tickets (Delete, List, Get, Recover) * Added Search option to Active tickets * Added internal note, public reply and assignee email options to active ticket updates * ⚡ Small improvements to #2296 * 🐛 Fix issue with pagination * ⚡ Improvements Co-authored-by: Jonathan <jonathan.bennetts@gmail.com>
This commit is contained in:
@@ -42,7 +42,7 @@ export async function zendeskApiRequest(this: IHookFunctions | IExecuteFunctions
|
||||
}
|
||||
|
||||
const base64Key = Buffer.from(`${credentials.email}/token:${credentials.apiToken}`).toString('base64');
|
||||
options.uri = `https://${credentials.subdomain}.zendesk.com/api/v2${resource}.json`;
|
||||
options.uri = uri || `https://${credentials.subdomain}.zendesk.com/api/v2${resource}.json`;
|
||||
options.headers!['Authorization'] = `Basic ${base64Key}`;
|
||||
return await this.helpers.request!(options);
|
||||
} else {
|
||||
@@ -52,7 +52,7 @@ export async function zendeskApiRequest(this: IHookFunctions | IExecuteFunctions
|
||||
throw new NodeOperationError(this.getNode(), 'No credentials got returned!');
|
||||
}
|
||||
|
||||
options.uri = `https://${credentials.subdomain}.zendesk.com/api/v2${resource}.json`;
|
||||
options.uri = uri || `https://${credentials.subdomain}.zendesk.com/api/v2${resource}.json`;
|
||||
|
||||
return await this.helpers.requestOAuth2!.call(this, 'zendeskOAuth2Api', options);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user