Ceyhun Tekin
Ceyhun Tekin

Reputation: 39

Update my documents in Meteor

I want to update my documents in Meteor.

update failed: Match failed

Error is caused by:

Template.KullaniciListele.events({
  'click .kaydet': function (event,template) {
    event.preventDefault();
        var tel = template.$('#telno').val();
        Meteor.users.update(this._id), {
          "$set": {
          tel:tel
          }
      };
  }
});

Upvotes: 0

Views: 34

Answers (1)

Alex K
Alex K

Reputation: 7217

Step 1. Check your code, and make it look pretty - otherwise you can't even see errors yourself. First, you have error here (how does it work at all?):

Meteor.users.update(this._id, {
   $set: {
      tel: tel
   }
});

Step 2. Try checking the value of this._id

Upvotes: 1

Related Questions