Calling a fairly simple validated method called updateStatus:
requestId = this._id;
text = "some text";
updateStatus.call({ requestId, text });
The method looks roughly like this:
export const updateStatus = new ValidatedMethod({
name: 'updateStatus',
validate({requestId, newStatus}) {
},
run({requestId, newStatus}) {
// Verify if user is logged in
console.log(requestId);
console.log(newStatus);
});
The first console.log properly logs the id of the request, whereas the 2nd one prints undefined.
Anyone knows what is going on?