findOneAndUpdate
updateOne
ex)
const inviteUser =
await Room.findOneAndUpdate({ roomId: roomId },{ $push: { attendName: addUser.nickname }});
await Room.updateOne({ roomId: roomId },{ $push: { attendName: addUser.nickname }});
변수명을 불러올때 안올때 사용
const inviteUser 를 불러오지않아도
동작함.
둘다 됨.