SessionStore: Reduce unnecessary vertical space

pull/4313/head
Richard Hansen 2020-09-21 16:55:27 -04:00 committed by John McLear
parent 5fb6bc1938
commit 4060db0daf
1 changed files with 2 additions and 9 deletions

View File

@ -19,7 +19,6 @@ SessionStore.prototype.__proto__ = Store.prototype;
SessionStore.prototype.get = function(sid, fn) {
messageLogger.debug('GET ' + sid);
db.get('sessionstorage:' + sid, (err, sess) => {
if (sess) {
sess.cookie.expires = 'string' == typeof sess.cookie.expires ? new Date(sess.cookie.expires) : sess.cookie.expires;
@ -36,18 +35,12 @@ SessionStore.prototype.get = function(sid, fn) {
SessionStore.prototype.set = function(sid, sess, fn) {
messageLogger.debug('SET ' + sid);
db.set('sessionstorage:' + sid, sess);
if (fn) {
process.nextTick(fn);
}
if (fn) process.nextTick(fn);
};
SessionStore.prototype.destroy = function(sid, fn) {
messageLogger.debug('DESTROY ' + sid);
db.remove('sessionstorage:' + sid);
if (fn) {
process.nextTick(fn);
}
if (fn) process.nextTick(fn);
};