Blame view
both/methods/read/collection.js
284 Bytes
0ccda7775
|
1 2 3 4 5 6 7 8 9 10 11 12 13 |
Meteor.methods({ readMethod( argument ) { check( argument, String ); var document = Collection.findOne( argument ); if ( !document ) { throw new Meteor.Error( 'document-not-found', 'No documents found matching this query.' ); } return document; } }); |