我正在通过骨干parse.com进行更新,但是parse.com出现了这个错误:
码 “:206,” 错误 “:” 解析:: 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);
}
});