即時通訊新的javascript,但我不是很確定我是如何失蹤的成功/錯誤的電話,我看透了,它看起來都對我打電話。成功/錯誤不叫
Parse.Cloud.job("UpdateWeekData", function(request, response) {
var weeks = [];
var weekCount = 0;
var weekQuery = new Parse.Query("WeekList");
weekQuery.find({
success: function(results) {
for (week in results) {
var weekCount = Parse.Query("Schedule");
weekQuery.equalTo("weekObj", week);
weekQuery.count({
success:function(count) {
var max = week.get("maxAppts");
week.set("apptsRemain", (max - count));
week.set("numApptsSch", count);
week.save();
},
error: function(error) {
response.error(error.message);
}
});
}
} ,
error: function(error) {
response.error(error.message);
}
});
});
任何想法,我錯過了電話?解析雲代碼說「成功/錯誤未被調用」