Closed glasser closed 8 years ago
Would that look like an option to the constructor called connection
? Would the option need to be passed differently on client and server?
I agree this is a very valid concern, should be addressed in the next revision.
Yeah. connection
isn't necessarily the best name since it can be either a server or a client, but that's what the Mongo.Collection constructor calls it.
Done: https://github.com/meteor/validated-method#defining-a-method-on-a-non-default-connection
If a lot of people run into this issue, we can document it more thoroughly.
Hello, I am trying to figure out how to make this work.
If I pass in Meteor
to both server and client side then it seems to work.
If I pass in a Connection object (e.g. Meteor.connection or the result of a DDP.connect
) it fails this call because of this line with this error:
Uncaught Error: Match error: Expected plain object in field connection
I tried just running a check
on any Connection object and it fails like above.
Did this ever work? I had used ValidatedMethod
objects for all my methods, now I am trying to add other client side apps connecting to the same server.
Any help?
It would be nice if there was an option to make this call
.methods
on a connection or server object other thanMeteor.connection
/Meteor.server
.