Answer the question
In order to leave comments, you need to log in
How to delete an entry in lowdb?
The application used to use mongodb, now I decided to switch to lowdb. There were problems deleting the entry.
router.delete('/api/destroy/:id', function(req, res) {
const id = req.params.id;
db.get('botes').remove({ id }).write();
});
Answer the question
In order to leave comments, you need to log in
It is possible to bring the type:
```
const id = parseInt(req.params.id);
```
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question