From 77606db87c35fee24f4efb1e18bedc35f12423fa Mon Sep 17 00:00:00 2001 From: mirovladimitrovski Date: Tue, 20 Jun 2023 11:36:01 +0200 Subject: [PATCH] fix: re-introduced the previously reverted changes --- src/services/inplayer.account.service.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/services/inplayer.account.service.ts b/src/services/inplayer.account.service.ts index 8f05db5d6..589c47118 100644 --- a/src/services/inplayer.account.service.ts +++ b/src/services/inplayer.account.service.ts @@ -171,7 +171,7 @@ export const getPublisherConsents: GetPublisherConsents = async (config) => { const { data } = await InPlayer.Account.getRegisterFields(jwp?.clientId || ''); const result = data?.collection - .filter((field) => !['email_confirmation'].includes(field.name)) + .filter((field) => !['email_confirmation', 'first_name', 'surname'].includes(field.name)) .map( (field): Consent => ({ type: field.type as ConsentFieldVariants, @@ -215,7 +215,12 @@ export const getCustomerConsents: GetCustomerConsents = async (payload) => { export const updateCustomerConsents: UpdateCustomerConsents = async (payload) => { try { const { customer, consents } = payload; - const params = { ...formatUpdateAccount(customer), ...{ metadata: { consents: JSON.stringify(consents) } } }; + const params = { + ...formatUpdateAccount(customer), + metadata: { + consents: JSON.stringify(consents), + }, + }; const { data } = await InPlayer.Account.updateAccount(params);