collection.js 284 Bytes edit raw blame history 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; } });