Blame view

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