我想從parse.com的_User表中刪除一個用戶,但出現錯誤。如何通過Parse REST API從_User中刪除用戶
我敢肯定,要求的語法是好的,我得到這個錯誤:
code: 206
error: "Parse::UserCannotBeAlteredWithoutSessionError"
我想我不應該做的登錄到刪除用戶,因爲我在API REST上執行。
$scope.delete = function (id) {
$http({
method: "DELETE",
url: url_users + id,
headers: {'X-Parse-Application-Id': appId,
'X-Parse-REST-API-Key': restId}
}).success(function (data) {
debugger;
swal("Deleted!", "All user data has been deleted", "success");
}).error(function (data) {
debugger;
swal("Error!", "An unexpected error ocurred, try again!", "error");
});
}
請給你的回答更多的細節和使用各環節作爲參考,詳情請參閱http://meta.stackexchange.com/questions/8231/are-answers-that-just-contain-links-elsewhere-really-good-answers。 – Panda