mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 01:56:46 +00:00
fix(ZendeskTrigger Node): Fix deprecated targets, replaced with webhooks (#3025)
* 🔨 fix for deprecated targets * ⚡ Move crendentials injection to the credential file Co-authored-by: ricardo <ricardoespinoza105@gmail.com>
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
import {
|
||||
ICredentialDataDecryptedObject,
|
||||
ICredentialTestRequest,
|
||||
ICredentialType,
|
||||
IHttpRequestOptions,
|
||||
INodeProperties,
|
||||
} from 'n8n-workflow';
|
||||
|
||||
@@ -29,4 +32,17 @@ export class ZendeskApi implements ICredentialType {
|
||||
default: '',
|
||||
},
|
||||
];
|
||||
async authenticate(credentials: ICredentialDataDecryptedObject, requestOptions: IHttpRequestOptions): Promise<IHttpRequestOptions> {
|
||||
requestOptions.auth = {
|
||||
username: `${credentials.email}/token`,
|
||||
password: credentials.apiToken as string,
|
||||
};
|
||||
return requestOptions;
|
||||
}
|
||||
test: ICredentialTestRequest = {
|
||||
request: {
|
||||
baseURL: '=https://{{$credentials.subdomain}}.zendesk.com/api/v2',
|
||||
url: '/ticket_fields.json',
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user