I am using Mongodb with express and creating a simple chat program . while creating a delete route i am not able to render a form to confirm password and it didn’t even response console.log(id);
// Destroy route
app.get("/chats/:id/delete", async(req,res) => {
let {id} = req.params;
let chat = await Chat.findById(id);
console.log(id);
res.render('delete.ejs', {chat});
});
New contributor
Arpit Saraswat is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.