skip to Main Content

Mongodb – mongoose code showing error of a call ack function

app.post ('/create_contact',function(req,res) { contact.create({ name :req.body.name, phone:req.body.phone },function(err,newContact) { if(err){console.log('error in creating a contact!'); return;} console.log('********',newContact); return res.redirect('back'); }); }); Errors: throw new MongooseError('Model.create() no longer accepts a callback'); ^ MongooseError: Model.create() no longer accepts a callback I tried this…

VIEW QUESTION

Navigator inside QuickAlert Dialog does not work – Flutter

In flutter, I have this Screen deep down in my MaterialApp's widget tree: class ItemDetailsScreen extends StatefulWidget { ItemDetailsScreen(); @override State<ItemDetailsScreen> createState() => _ItemDetailsScreenState(); } class _ItemDetailsScreenState extends State<ItemDetailsScreen> { @override Widget build(BuildContext context) { bleController.onBleStatusChange('box_is_open', context); return Scaffold(.... }…

VIEW QUESTION
Back To Top
Search