mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
@@ -34,7 +34,7 @@ export interface ICustomProperties {
|
|||||||
* @param {object} body
|
* @param {object} body
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
export async function pipedriveApiRequest(this: IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions, method: string, endpoint: string, body: IDataObject, query?: IDataObject, formData?: IDataObject, downloadFile?: boolean): Promise<any> { // tslint:disable-line:no-any
|
export async function pipedriveApiRequest(this: IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions, method: string, endpoint: string, body: IDataObject, query: IDataObject = {}, formData?: IDataObject, downloadFile?: boolean): Promise<any> { // tslint:disable-line:no-any
|
||||||
const authenticationMethod = this.getNodeParameter('authentication', 0);
|
const authenticationMethod = this.getNodeParameter('authentication', 0);
|
||||||
|
|
||||||
const options: OptionsWithUri = {
|
const options: OptionsWithUri = {
|
||||||
@@ -67,7 +67,7 @@ export async function pipedriveApiRequest(this: IHookFunctions | IExecuteFunctio
|
|||||||
let responseData;
|
let responseData;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (authenticationMethod === 'basicAuth' || authenticationMethod === 'apiToken') {
|
if (authenticationMethod === 'basicAuth' || authenticationMethod === 'apiToken' || authenticationMethod === 'none') {
|
||||||
|
|
||||||
const credentials = this.getCredentials('pipedriveApi');
|
const credentials = this.getCredentials('pipedriveApi');
|
||||||
if (credentials === undefined) {
|
if (credentials === undefined) {
|
||||||
|
|||||||
@@ -215,7 +215,6 @@ export class PipedriveTrigger implements INodeType {
|
|||||||
async create(this: IHookFunctions): Promise<boolean> {
|
async create(this: IHookFunctions): Promise<boolean> {
|
||||||
const webhookUrl = this.getNodeWebhookUrl('default');
|
const webhookUrl = this.getNodeWebhookUrl('default');
|
||||||
const authentication = this.getNodeParameter('authentication', 0) as string;
|
const authentication = this.getNodeParameter('authentication', 0) as string;
|
||||||
|
|
||||||
const eventAction = this.getNodeParameter('action') as string;
|
const eventAction = this.getNodeParameter('action') as string;
|
||||||
const eventObject = this.getNodeParameter('object') as string;
|
const eventObject = this.getNodeParameter('object') as string;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user