Browse Source

Commit 10.4: Replace update and remove with methods.

Frederic G. MARAND 8 years ago
parent
commit
786871aa22
1 changed files with 2 additions and 4 deletions
  1. 2 4
      simple-todos.js

+ 2 - 4
simple-todos.js

@@ -46,13 +46,11 @@ if (Meteor.isClient) {
 
   Template.task.events({
     'click .delete': function (e) {
-      Tasks.remove(this._id);
+      Meteor.call('deleteTask', this._id);
     },
 
     'click .toggle-checked' : function (e) {
-      Tasks.update(this._id, {
-        $set: { checked: !this.checked }
-      });
+      Meteor.call('setChecked', this._id, !this.checked);
     }
   });