每次将新对象保存到名为“Message”的类中时,我都尝试运行此云代码,但是我相信我错误地调用了 afterSave 方法,因为在我将新对象保存到我的新对象后甚至没有显示我的 console.log名为“消息”的类。我的代码有什么问题?
Parse.Cloud.afterSave("sendMessage", function(Message, response) {
var messageBody = null;
var messageSenderName = null;
var messageSenderId = null;
var randUsers = [];
console.log("The variables were set");
............other code that doesn't matter................
});