我想通过id来删除客户,但我收到了错误。请求帮助
app.get('/deleteCustomer/:customerID', function (req, res){
var customerID = req.params.customerID;
customer.delete({
where:{
id:customerID
},
include:[mealRequirement, user]
}).then(function(customers){
//res.render('main.ejs', {page:"addCustomer", mrcats:mrcats, customer:customers[0], user:customers[0].user, authUser: req.isAuthenticated()});
});
});
TypeError:customer.delete不是Object.handle的函数