Reputation: 4150
I'm updating by backbone parse.com but appear this error by parse.com:
code":206,"error":"Parse::UserCannotBeAlteredWithoutSessionError
model:
var Person = Backbone.Model.extend({
urlRoot:"https://api.parse.com/1/classes/_User/",
idAttribute: "objectId",
.....
collection:
var Usercollection = Backbone.Collection.extend({
model:Person,
url:'https://api.parse.com/1/classes/_User/',
idAttribute: "objectId",
parse: function(data) {
return data.results;
}
code to update model:
this.model.save({email:"[email protected]"}, {
//wait:true,
success:function(model, response) {
console.log('Successfully saved!');
},
error: function(model, error) {
console.log(model.toJSON());
console.log(error.responseText);
}
});
Upvotes: 0
Views: 507
Reputation: 1948
According to the discussion in Parse.com, user needs to login and can only modify its own data.
Upvotes: 1