Blame view

both/methods/insert/collection-name.js 222 Bytes
c39994410   Ryan Glover   wip converting to...
1
  Meteor.methods({
5cb01249d   Ryan Glover   clean up and addi...
2
    insertBoth( object ) {
c39994410   Ryan Glover   wip converting to...
3
4
5
6
7
8
9
10
11
      check( object, Object );
  
      try {
        return Documents.insert( object );
      } catch ( exception ) {
        throw new Meteor.Error( '500', `${ exception }` );
      }
    }
  });