sessionstore
Advanced tools
Comparing version 0.1.2 to 0.2.0
@@ -41,12 +41,26 @@ var util = require(process.binding('natives').util ? 'util' : 'sys') | ||
db.save('_design/collection', { | ||
views: { | ||
findAll: { | ||
map: function(doc) { | ||
emit(doc.collectionName, doc); | ||
db.get('_design/collection', function(err, obj) { | ||
var view = { | ||
views: { | ||
findAll: { | ||
map: function(doc) { | ||
emit(doc.collectionName, doc); | ||
} | ||
} | ||
} | ||
}; | ||
if (err && err.error == 'not_found') { | ||
db.save('_design/collection', view, function(err) { | ||
if (callback) { return callback(null); } | ||
}); | ||
} else if (err) { | ||
if (callback) { return callback(err); } | ||
} else { | ||
db.save('_design/collection', obj._rev, view, function(err) { | ||
if (callback) { return callback(null); } | ||
}); | ||
} | ||
}, function(err) { | ||
if (callback) { return callback(err); } | ||
}); | ||
@@ -53,0 +67,0 @@ } |
{ | ||
"author": "adrai", | ||
"name": "sessionstore", | ||
"version": "0.1.2", | ||
"version": "0.2.0", | ||
"private": false, | ||
@@ -24,3 +24,3 @@ "main": "index.js", | ||
"description": "Sessionstore is a node.js module for multiple databases. It can be very useful if you work with express or connect.", | ||
"keywords" : [ | ||
"keywords": [ | ||
"orm", | ||
@@ -27,0 +27,0 @@ "mongodb", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Non-existent author
Supply chain riskThe package was published by an npm account that no longer exists.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
16862
338
1