Hello all,
I am using Swift DDP to build a native iOS app with Meteor as my back end. I am using MDG Validated Method for my methods with Simple-Schema for validation.
For example:
export const example = new ValidatedMethod({ name: 'examples.example', validate: new SimpleSchema({ name: { type: String }, value: { type: Number }, }).validator(), run({ name, value }) { console.log(name, value); } });
I can’t seem to get valid JSON to pass through to the method. Every time I get the error "Exception while invoking method ‘sensors.insert’ Error: The first argument of validate() or validateOne() must be an object."
Any help?
Thanks!