When a user clicks, data or an object from one collection is being transferred to another. The image below represents the individual object that is being moved.
https://i.sstatic.net/PVX2q.png
This click event is crucial in this process.
Template.postsView.events({
'click .rediscover-toggle': function(e){
var descovery = this;
console.log(descovery);
e.preventDefault();
Meteor.call('rediscovering', {descovery: descovery});
},
});
Everything seems to be working fine as the captured data appears in the console when clicked.
Here's how it looks like in my methods:
Meteor.methods({
rediscovering: function (descovery) {
RediscoveryCollection.insert(descovery);
}
})
Despite everything appearing correct and without any errors in the browser or server terminal, the object is not successfully getting inserted into the other collection.