我正在通过骨干网 parse.com 进行更新,但 parse.com 出现此错误:
代码":206,"error":"Parse::UserCannotBeAlteredWithoutSessionError
模型:
var Person = Backbone.Model.extend({
urlRoot:"https://api.parse.com/1/classes/_User/",
idAttribute: "objectId",
......
收藏:
var Usercollection = Backbone.Collection.extend({
model:Person,
url:'https://api.parse.com/1/classes/_User/',
idAttribute: "objectId",
parse: function(data) {
return data.results;
}
更新模型的代码:
this.model.save({email:"ciao@lib.it"}, {
//wait:true,
success:function(model, response) {
console.log('Successfully saved!');
},
error: function(model, error) {
console.log(model.toJSON());
console.log(error.responseText);
}
});