SyntaxFix
Write A Post
Hire A Developer
Questions
In my case, I did this
const eventId = event.id; User.findByIdAndUpdate(id, { $push: { createdEvents: eventId } }).exec();