-
Notifications
You must be signed in to change notification settings - Fork 0
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
Conversation
# Conflicts: # package-lock.json
}; | ||
|
||
const preRequestHandler = (item) => { | ||
item.communications | ||
.forEach((item) => sanitizer(item, communicationsFieldsToSend)); | ||
.forEach((item) => sanitize(item, communicationsFieldsToSend)); //переробити на аплій трансформ? подивитись, як працює новий санітайс |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
тут напевне недороблено трішки?
item.communications | ||
.forEach((item) => sanitizer(item, communicationsFieldsToSend)); | ||
.forEach((item) => sanitize(item, communicationsFieldsToSend)); //переробити на аплій трансформ? подивитись, як працює новий санітайс |
There was a problem hiding this comment.
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)); |
There was a problem hiding this comment.
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), |
There was a problem hiding this comment.
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
No description provided.