通过骨干问题更新parse.com

时间:2013-07-30 18:49:00

标签: javascript backbone.js parse-platform

我正在通过骨干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);
}
  });

1 个答案:

答案 0 :(得分:1)

根据the discussion in Parse.com,用户需要登录并且只能修改自己的数据。