f-8: code: use recursive delete #8

Signed-off-by: GnomeZworc <nicolas.boufidjeline@g3e.fr>
This commit is contained in:
GnomeZworc 2025-12-26 23:43:29 +01:00
commit 38f2ed1b83
Signed by: nicolas.boufideline
GPG key ID: 4406BBBF8845D632

View file

@ -60,9 +60,7 @@ func AddInDB(dbName string, line string) error {
func DeleteInDB(dbName, id string) error {
key := []byte(dbName + "/" + id + "/bash")
return DB.Update(func(txn *badger.Txn) error {
return txn.Delete(key)
})
return kv.DeleteInDB(DB, string(key))
}
func CountInDB(dbName, id string) int {