From dfbf4d2cc4c362b249151de3bf1492393aa32a1f Mon Sep 17 00:00:00 2001 From: Anant Anand Gupta Date: Tue, 26 Mar 2024 12:50:21 +0530 Subject: [PATCH] fixed issue introduced in last release - the body part of the declarative node was not correctly referencing the parameters. - body was going as a string as compared to evaluated data. --- nodes/Listmonk/businessOperations/subscribers.ts | 4 ++-- nodes/Listmonk/options.ts | 7 ++----- package-lock.json | 4 ++-- package.json | 2 +- 4 files changed, 7 insertions(+), 10 deletions(-) diff --git a/nodes/Listmonk/businessOperations/subscribers.ts b/nodes/Listmonk/businessOperations/subscribers.ts index d166a68..5cbc96c 100644 --- a/nodes/Listmonk/businessOperations/subscribers.ts +++ b/nodes/Listmonk/businessOperations/subscribers.ts @@ -90,12 +90,12 @@ export const subscriberOperations: INodeProperties[] = [ { name: 'Manage Subscriber List', value: 'manageSubscribersLists', - action: 'Add or remove multiple subscribers to and from given lists or mark them unsubscribed in list', + action: 'Manage subscriber list', routing: { request: { method: 'PUT', url: '/subscribers/lists', - body: '{{JSON.stringify({"ids":JSON.parse($parameter.subscriberIds), "action":$parameter.subscriptionAction, "target_list_ids":JSON.parse($parameter.listIds), "status":$parameter.subscriptionStatus })}}', + body: '={{JSON.stringify({"ids":JSON.parse($parameter.subscriberIDs), "action":$parameter.subscriptionAction, "target_list_ids":JSON.parse($parameter.listIDs), "status":$parameter.subscriptionStatus })}}', encoding: 'json', json: true, }, diff --git a/nodes/Listmonk/options.ts b/nodes/Listmonk/options.ts index e7b6304..9c50dec 100644 --- a/nodes/Listmonk/options.ts +++ b/nodes/Listmonk/options.ts @@ -333,10 +333,8 @@ export const listmonkOptions: INodeProperties[] = [ value: 'unsubscribe', }, ], - default: 'add', // The initially selected option - description: 'Subscriber status', + default: 'add', displayOptions: { - // the resources and operations to display this element with show: { operation: ['manageSubscribersLists'], }, @@ -372,10 +370,9 @@ export const listmonkOptions: INodeProperties[] = [ value: 'unsubscribed', }, ], - default: 'confirmed', // The initially selected option + default: 'confirmed', description: 'Subscriber status', displayOptions: { - // the resources and operations to display this element with show: { operation: ['manageSubscribersLists'], }, diff --git a/package-lock.json b/package-lock.json index 345f074..c896058 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "n8n-nodes-listmonk", - "version": "1.0.6", + "version": "1.0.7", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "n8n-nodes-listmonk", - "version": "1.0.6", + "version": "1.0.7", "license": "MIT", "devDependencies": { "@types/express": "^4.17.6", diff --git a/package.json b/package.json index 3ff6782..f2fc700 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "n8n-nodes-listmonk", - "version": "1.0.6", + "version": "1.0.7", "description": "A n8n node to interact with Listmonk app", "keywords": [ "n8n-community-node-package",