@@ -17,7 +17,7 @@ export const roomPopulateOption = [
1717 select : "-_id user settlementStatus readAt" ,
1818 populate : {
1919 path : "user" ,
20- select : "_id id name nickname profileImageUrl withdraw" ,
20+ select : "_id id name nickname profileImageUrl withdraw badge " ,
2121 } ,
2222 } ,
2323] ;
@@ -26,7 +26,13 @@ interface PopulatedParticipant
2626 extends Pick < Participant , "settlementStatus" | "readAt" > {
2727 user : Pick <
2828 User ,
29- "_id" | "id" | "name" | "nickname" | "profileImageUrl" | "withdraw"
29+ | "_id"
30+ | "id"
31+ | "name"
32+ | "nickname"
33+ | "profileImageUrl"
34+ | "withdraw"
35+ | "badge"
3036 > | null ;
3137}
3238
@@ -92,7 +98,7 @@ export const formatSettlement = (
9298 koName : roomObject . to ! . koName ,
9399 } ,
94100 part : roomObject . part . map ( ( participantSubDocument ) => {
95- const { _id, name, nickname, profileImageUrl, withdraw } =
101+ const { _id, name, nickname, profileImageUrl, withdraw, badge } =
96102 participantSubDocument . user ! ;
97103 const { settlementStatus, readAt } = participantSubDocument ;
98104 return {
@@ -101,6 +107,7 @@ export const formatSettlement = (
101107 nickname,
102108 profileImageUrl,
103109 withdraw,
110+ badge,
104111 isSettlement : includeSettlement ? settlementStatus : undefined ,
105112 readAt : readAt ?? roomObject . madeat ,
106113 } ;
0 commit comments