这是我的代码:
Parse.Cloud.define("findRestaurantName", function(request, response) {
getRestaurantInfo(request.params.username,{
success: function(things) {
response.success(things);
},
error: function() {
response.error("username lookup failed");
}
});
});
function getRestaurantInfo(restaurantName, callback){
var query = new Parse.Query("RestaurantDataBase");
query.equalTo("name", restaurantName);
query.find({
success: function(results){
callback.success(results);
},
error: function(){
callback.error("lookup fail");
}
});
}
为什么当我尝试在Xcode上运行代码时,我从Parse函数中得到一个空数组?