Updated userSchema to store flair by reference

This commit is contained in:
rainbow napkin 2024-12-03 06:21:43 -05:00
parent 108290de2d
commit 279640a7e7
7 changed files with 73 additions and 54 deletions

View file

@ -38,7 +38,8 @@ module.exports = class{
//Add this socket on to the userobject
userObj.sockets.push(socket.id);
}else{
userObj = new connectedUser(userDB.user, userDB.id, userDB.rank, chanRank, userDB.flair, this, socket);
await userDB.populate('flair');
userObj = new connectedUser(userDB.user, userDB.id, userDB.rank, chanRank, userDB.flair.name, this, socket);
}
//Set user entry in userlist