Updated userSchema to store flair by reference
This commit is contained in:
parent
108290de2d
commit
279640a7e7
7 changed files with 73 additions and 54 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue