I have the following code:
var roomDoc = Rooms.findAndModify({
query: {name: roomName},
update: {$setOnInsert: {unixTimestamp: unixTimestampSeconds()}},
new: true,
upsert: true
});
After receiving the error, which .findAndModify is undefined, I realized, Meteor does not implement .findAndModify.
Is there a Meteor way to achieve similar functionality using different requests?
source
share