I try to update mongo collection(usr), but i have some error
MongoError: '$set' is empty. You must specify a field like so: {$mod: {<field>: ...}}
There is .js
`Template.profileEdit.events({
‘submit .profileEdit’: function(e) {
e.preventDefault();
var currentProfid = this._id;
var profProperties = {
uname: $(e.usr).find('[name=uname]').val(),
usurname: $(e.usr).find('[name=usurname]').val(),
uabout: $(e.usr).find('[name=uabout]').val()
}
usr.update(currentProfid, {$set: profProperties}, function(error) {
if (error) {
// display the error to the user
alert(error.reason);
} else {
Router.go('profile', {_id: currentProfid});
}
});
}
});And .html
<input id="icon_prefix" type="text" class="uname">
<label for="icon_prefix">{{uname}}</label>
</div>
</div>
<div class="row">
<div class="input-field col s6">
<input id="icon_prefix" type="text" class="usurname">
<label for="icon_prefix">{{usurname}}</label>
</div>
</div>
<div class="row">
<div class="input-field col s6">
<input id="icon_prefix" type="text" class="uabout">
<label for="icon_prefix">{{uabout}}</label>
</div>
</div>
<button class="btn waves-effect waves-light" type="submit">Submit</button>
</form>
`
Help, please.