I'm attempting to filter some results using azure mobile service scripts but i'm getting this error in the log.The parameters I pass to this function are also shown.
ERROR Error in script '/table/Restaurant.read.js'. Error: Invalid callback options passed to 'query'. Callback options must be an object with at least one 'success' or 'error' property of type 'function' or a systemProperties property of type 'Array'. [external code] at read (:7:11) at :1:6 [external code]
Here's my code
function read(query, user, request) {
var location=request.parameters.Location;
var category=request.parameters.Category;
console.log("location is"+location);
console.log("category is"+category);
var sql="SELECT * from restaurant where Location=? AND Category=?";
mssql.query(sql,[location],[category],{success:function(results){request.respond(statusCodes.Ok,results);}});
}