-
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
[EN-7483] Referer - Dashboard - Allow to filter profiles by refererId #236
[EN-7483] Referer - Dashboard - Allow to filter profiles by refererId #236
Conversation
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.
👍
Je te re-request une review étant donné que j'ai rechangé comme on s'est dit la semaine dernière. |
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.
Ouep bon changement
profiles.map(async (profile): Promise<PublicProfile> => { | ||
const lastSentMessage = await this.getLastContact( | ||
userId, | ||
profile.user.id | ||
); | ||
const lastReceivedMessage = await this.getLastContact( | ||
profile.user.id, | ||
userId | ||
); | ||
|
||
const { user, ...restProfile }: UserProfile = profile.toJSON(); | ||
return { | ||
...user, | ||
...restProfile, | ||
lastSentMessage: lastSentMessage?.createdAt || null, | ||
lastReceivedMessage: lastReceivedMessage?.createdAt || null, | ||
}; |
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.
Pas sur que ce soit opti si y a beaucoup de referredUsers mais on verra en temps voulu.
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.
Yes, j'ai simplement utilisé la même logique de construction que dans le réseau d'entraide mais c'est clairement perfectible.
No description provided.