Add method 'createItem' to DB plugins
This commit is contained in:
parent
126a57d5ab
commit
5eade81294
4 changed files with 34 additions and 0 deletions
|
|
@ -11,6 +11,9 @@ EncryptedInsightStorage.prototype.getItem = function(name, callback) {
|
|||
var key = cryptoUtil.kdfbinary(this.password + this.email);
|
||||
InsightStorage.prototype.getItem.apply(this, [name,
|
||||
function(err, body) {
|
||||
if (err) {
|
||||
return callback(err);
|
||||
}
|
||||
var decryptedJson = cryptoUtil.decrypt(key, body);
|
||||
if (!decryptedJson) {
|
||||
return callback('Internal Error');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue