From 0ca02e541628d689f070926b57de13a6bb8f71b1 Mon Sep 17 00:00:00 2001 From: pratishta Date: Fri, 8 Nov 2024 13:11:40 -0500 Subject: [PATCH] Use const and camelCase --- server/src/subscriber/subscriber.service.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/src/subscriber/subscriber.service.ts b/server/src/subscriber/subscriber.service.ts index f2e696f6..1dbba6ab 100644 --- a/server/src/subscriber/subscriber.service.ts +++ b/server/src/subscriber/subscriber.service.ts @@ -215,7 +215,7 @@ export class SubscriberService { * @returns {object} */ async update(environment: string, email: string, custom_fields: object) { - var updated_custom_fields = Object.entries(custom_fields).reduce((acc, curr) => ({ ...acc, [`zap_${environment}_${curr[0]}`]: curr[1] }), {}) + const updatedCustomFields = Object.entries(custom_fields).reduce((acc, curr) => ({ ...acc, [`zap_${environment}_${curr[0]}`]: curr[1] }), {}) const request = { url: `/v3/marketing/contacts`, @@ -223,7 +223,7 @@ export class SubscriberService { body: { "contacts": [{ "email": email, - "custom_fields": updated_custom_fields + "custom_fields": updatedCustomFields }] } }