mirror of
https://github.com/n8n-io/n8n.git
synced 2025-03-05 20:50:17 -08:00
parent
23dbdbc169
commit
0f5bcd59c8
|
@ -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;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue