Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactoring/queue members api [WTEL-3619] #481

Merged
merged 11 commits into from
Nov 7, 2023

Conversation

liza-pohranichna
Copy link
Contributor

No description provided.

};

const preRequestHandler = (item) => {
item.communications
.forEach((item) => sanitizer(item, communicationsFieldsToSend));
.forEach((item) => sanitize(item, communicationsFieldsToSend)); //переробити на аплій трансформ? подивитись, як працює новий санітайс
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

тут напевне недороблено трішки?

Comment on lines 48 to 49
item.communications
.forEach((item) => sanitizer(item, communicationsFieldsToSend));
.forEach((item) => sanitize(item, communicationsFieldsToSend)); //переробити на аплій трансформ? подивитись, як працює новий санітайс
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ось ця штука мутує ітем, а трансформери мутувати параметр вхідний не мають

};

const preRequestHandler = (item) => {
item.communications
.forEach((item) => sanitizer(item, communicationsFieldsToSend));
.forEach((item) => sanitize(item, communicationsFieldsToSend));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

мутує початковий об'єкт
треба зробити копію спершу

const listHandler = (items) => {
return items.map((item) => ({
...item,
communications: mapDefaultCommunications(item),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

зійде для сільської місцевості, але якщо хочеш по-крутому, то було би круто на коммунікації накласти трансформер, замість виклику метода)

# Conflicts:
#	package-lock.json
#	src/modules/contact-center/modules/queues/modules/members/api/queueMembers.js
…bitel/client into refactoring/queue-members-api

� Conflicts:
�	package-lock.json
�	src/modules/contact-center/modules/queues/modules/skills/api/queueSkills.js
@dlohvinov dlohvinov merged commit 5c669b3 into master Nov 7, 2023
1 check passed
@dlohvinov dlohvinov deleted the refactoring/queue-members-api branch November 7, 2023 09:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants