So, I'm using this firebase-admin library here. I read the docs from Firebase here. But I can't find the section how to remove the data with firebase-admin.
I do something like this, but it doesn't work:
router.get('/delete_category', function(req, res, next) {
var key = req.query.item;
let del_ref = admin.database().ref("product/" + key);
del_ref.remove()
});
Can you guys help me on how to delete the data from my firebase database with firebase-admin? Thanks in advance
Notes: I am using NodeJS with Express Framework and Handlebars