i'm trying to return a boolean 0 or 1 but doesn't work.
How can i do that?
checkKitReference(req, res)
{
var ref = req.params.ref;
console.log("SELECT ref FROM st WHERE ref="+ref);
request.query("SELECT ref FROM st WHERE ref='"+ref+"'",(err, records) => {
console.log(err);
if(records !== '')
{
return 0;
}
else
{
return 1;
}
});
}
Thank you.