I'm trying to update a Parse Server user from my client web app using the Javascript SDK.
I understand that this isn't possible using Parse.User but is possible using Parse.Object. I'm following the guidance to update Object but can't seem to get bast the 3rd line of the function.
function () {
var updateTheUser = Parse.Object.extend("_User");
var query = new Parse.User.current();
query.get(Parse.User.current().id, {
success: function (update) {
// The object was retrieved successfully.
update.set("phone", "01234 567890");
update.set("Barred", false);
update.save(null, {
success: function (update) {
console.log("Updated!");
}
});
},
error: function (object, error) {
// The object was not retrieved successfully.
// error is a Parse.Error with an error code and message.
}
});
};
};