在我的云代码中,我试图在使用对象 ID 保存后立即从 Parse.com 查询一个对象。出于某种原因,它无法正常工作,并且我尝试过的所有其他加星标线的变体也无法正常工作。我究竟做错了什么?
Parse.Cloud.afterSave("NewMessage", function(leanBody, leanSenderName, leanSenderId, request) {
var query = new Parse.Query("NewMessage");
query.get(request.object.id, { *************************************************
success: function(results) {
console.log("The first object was retrieved");
leanBody = (results.get("MessageBody"));
leanSenderName = (results.get("senderName"));
leanSenderId = (results.get("senderId"));
getUsers(leanBody, leanSenderName, leanSenderId);
results.destroy({
success: function(results) {
console.log("deleted");
}, error: function(results, error){
}
});
}, error: function(error){
}
});
});