Hi,
We have a guide in meteor that suggests to use a single object as a parameter in method calls and subscriptions. Since that, I built every method or subscription this way:
Meteor.methods({
'iterations.insert'({ uuid, name }) {
const _iteration = Iterations.findOne({ uuid });
if (_iteration) {
return _iteration._id;
}
return Iterations.insert({ uuid, name });
}
});
It's not possible, because the client.call that's implemented in this project receives a array of objects Object[] and pass it as parameters building a json like this:
params: ["uuid", "name"].
It should be possible as well to pass a single object to client.call but I don't know if its going to build this:
params: [{uuid: "uuid", name: "name"}]
or this
params: {uuid: "uuid", name: "name"}