🐛 Fix issue #987 (#990)

This commit is contained in:
Ricardo Espinoza 2020-09-30 10:12:39 -04:00 committed by GitHub
parent 23dbdbc169
commit 0f5bcd59c8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 3 deletions

View file

@ -34,7 +34,7 @@ export interface ICustomProperties {
* @param {object} body
* @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 options: OptionsWithUri = {
@ -67,7 +67,7 @@ export async function pipedriveApiRequest(this: IHookFunctions | IExecuteFunctio
let responseData;
try {
if (authenticationMethod === 'basicAuth' || authenticationMethod === 'apiToken') {
if (authenticationMethod === 'basicAuth' || authenticationMethod === 'apiToken' || authenticationMethod === 'none') {
const credentials = this.getCredentials('pipedriveApi');
if (credentials === undefined) {

View file

@ -215,7 +215,6 @@ export class PipedriveTrigger implements INodeType {
async create(this: IHookFunctions): Promise<boolean> {
const webhookUrl = this.getNodeWebhookUrl('default');
const authentication = this.getNodeParameter('authentication', 0) as string;
const eventAction = this.getNodeParameter('action') as string;
const eventObject = this.getNodeParameter('object') as string;