delete single image in node js mongodb
// Delete single image
const deleteImage = (req, res) => {
Imageup.deleteOne({ _id: req.params.id })
.then(() => {
res.status(200).json({
message: "Image deleted successfully!",
});
})
.catch((error) => {
res.status(400).json({
error: error,
});
});
};