dimanche 4 janvier 2015

Destroy a "User" from parse sdk with javascript


i need to delete a user form parse sdk with javascript, i tried loading the user query and then calling the destroy() but it gives me:



[HTTP/1.1 400 Bad Request]



my code is here



var query = new Parse.Query("User");
query.equalTo("email", 'wathmal@hotmail.com');
query.find().then(function(results) {
console.log(results[0]);
results[0].destroy();
});


this won't destroy the user. can anybody help?





Aucun commentaire:

Enregistrer un commentaire