From 7226b5071ef8cc9e83eddf4dae0a57c6fcdf00b0 Mon Sep 17 00:00:00 2001 From: Ricardo Espinoza Date: Thu, 4 Feb 2021 03:58:33 -0500 Subject: [PATCH] :bug: Fix bug with Typeform OAuth2 flow (#1402) --- .../credentials/TypeformOAuth2Api.credentials.ts | 3 +-- .../nodes-base/nodes/Typeform/GenericFunctions.ts | 8 ++++++-- .../nodes/Typeform/TypeformTrigger.node.ts | 6 +++--- packages/nodes-base/nodes/Typeform/typeform.png | Bin 988 -> 0 bytes packages/nodes-base/nodes/Typeform/typeform.svg | 6 ++++++ 5 files changed, 16 insertions(+), 7 deletions(-) delete mode 100644 packages/nodes-base/nodes/Typeform/typeform.png create mode 100644 packages/nodes-base/nodes/Typeform/typeform.svg diff --git a/packages/nodes-base/credentials/TypeformOAuth2Api.credentials.ts b/packages/nodes-base/credentials/TypeformOAuth2Api.credentials.ts index 2708af5aff..69cdb874b1 100644 --- a/packages/nodes-base/credentials/TypeformOAuth2Api.credentials.ts +++ b/packages/nodes-base/credentials/TypeformOAuth2Api.credentials.ts @@ -9,7 +9,6 @@ const scopes = [ 'forms:read', ]; - export class TypeformOAuth2Api implements ICredentialType { name = 'typeformOAuth2Api'; extends = [ @@ -36,7 +35,7 @@ export class TypeformOAuth2Api implements ICredentialType { displayName: 'Scope', name: 'scope', type: 'hidden' as NodePropertyTypes, - default: scopes.join(','), + default: scopes.join(' '), }, { displayName: 'Auth URI Query Parameters', diff --git a/packages/nodes-base/nodes/Typeform/GenericFunctions.ts b/packages/nodes-base/nodes/Typeform/GenericFunctions.ts index 83ca713afe..11110ca4f1 100644 --- a/packages/nodes-base/nodes/Typeform/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Typeform/GenericFunctions.ts @@ -8,9 +8,13 @@ import { INodePropertyOptions, } from 'n8n-workflow'; -import { OptionsWithUri } from 'request'; -import { IDataObject } from 'n8n-workflow'; +import { + OptionsWithUri, +} from 'request'; +import { + IDataObject, +} from 'n8n-workflow'; // Interface in Typeform export interface ITypeformDefinition { diff --git a/packages/nodes-base/nodes/Typeform/TypeformTrigger.node.ts b/packages/nodes-base/nodes/Typeform/TypeformTrigger.node.ts index d45ca7fa67..206a386468 100644 --- a/packages/nodes-base/nodes/Typeform/TypeformTrigger.node.ts +++ b/packages/nodes-base/nodes/Typeform/TypeformTrigger.node.ts @@ -22,7 +22,7 @@ export class TypeformTrigger implements INodeType { description: INodeTypeDescription = { displayName: 'Typeform Trigger', name: 'typeformTrigger', - icon: 'file:typeform.png', + icon: 'file:typeform.svg', group: ['trigger'], version: 1, subtitle: '=Form ID: {{$parameter["formId"]}}', @@ -133,10 +133,10 @@ export class TypeformTrigger implements INodeType { for (const item of items) { if (item.form_id === formId - && item.url === webhookUrl) { + && item.url === webhookUrl) { webhookData.webhookId = item.tag; return true; - } + } } return false; diff --git a/packages/nodes-base/nodes/Typeform/typeform.png b/packages/nodes-base/nodes/Typeform/typeform.png deleted file mode 100644 index df0b904216e647c88540a7d819afef70552477a6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 988 zcmeAS@N?(olHy`uVBq!ia0vp^HXzKw3=&b&bYNg$%n0xaaRqX+9?2=$M+C3N$1oCB@s@d&Z0z{r&y^{{E|1uP!Yu4G#|oD(md*+`4tE zyu7@utgMWTjH05VnVA{T1fcoW*4B1*cKZ7IKKn0xd> zqociziLsu982_D4hb6$MJpmL8@i_kWa(J+kqricWj4Uo^BF~qU&wE&8_Iyt9oVV{7 zrzV`MtF06~KKJI`g*6{q{|mcbU0+qbd)m{}-@D45v9EFxy}FhA_QjZ&r{onB7?hem zo$TLv!G9}@jdXx#vt>T7QoZEQ=R9wd3=69rY-QETxEiw;U10aWb+;i#{^vHEoRWY| zU1jt4e)lhU{vvwf?an%(a_-f;W#9gOf8uVpsKrg+`;%D}-Oo!fz2z%zj;t=%DCfHL zB600q-o&!46}Ki?`FSj^y;UBj{=<0N6Ft>4!n@W^Un+eu*XZ)enN#iTJk{2(3p}(a zerv4hr-=#^Up_o!wPWY`KNED@<+b9}zv{SObBx&;`)YMpdW+(-I#K?KntUsMnD0$0 zTKe%^e8`{EBF;Oz{?AT&6Z&z7!J%L8SKSnFj-1$~teVi0-0Kr;J1b$;jq4A4XEdE( zyM>o|ol$P-q3WVHvX`&RZHVRed;C%4M12S6vn!X + + + + +