Skip to content

Commit

Permalink
fix: don't display "first_name" and "surname" custom register fields …
Browse files Browse the repository at this point in the history
…in registration step 1
  • Loading branch information
mirovladimitrovski committed Jun 19, 2023
1 parent 0b69fc3 commit 252feb2
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/services/inplayer.account.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ export const getPublisherConsents: GetPublisherConsents = async (config) => {
const { data } = await InPlayer.Account.getRegisterFields(jwp?.clientId || '');

const result = data?.collection
.filter((field) => field.name !== 'email_confirmation')
.filter((field) => !['email_confirmation', 'first_name', 'surname'].includes(field.name))
.map(
(field): Consent => ({
type: field.type as ConsentFieldVariants,
Expand Down Expand Up @@ -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);

Expand Down

0 comments on commit 252feb2

Please sign in to comment.