diff --git a/lib/services/db/index.js b/lib/services/db/index.js index b79db2db..a4e7edd7 100644 --- a/lib/services/db/index.js +++ b/lib/services/db/index.js @@ -3,6 +3,7 @@ var util = require('util'); var fs = require('fs'); var async = require('async'); +var _ = require('lodash'); var levelup = require('levelup'); var leveldown = require('leveldown'); var mkdirp = require('mkdirp'); @@ -150,6 +151,21 @@ DB.prototype.put = function(key, value, callback) { this._store.put(key, value, callback); }; +DB.prototype.del = function(key, callback) { + + if (this._stopping) { + callback(); + } + + // FLOSight Error Correction from RanchiMall 20th May 2021. removed the unhandled assert and replaced by looging of error + if (Buffer.isBuffer(key) == false) { + log.error('key NOT a buffer as expected.'); + } + // assert(Buffer.isBuffer(key), 'key NOT a buffer as expected.'); + + this._store.del(key, callback); +} + DB.prototype.batch = function(ops, callback) { if (this._stopping) {