@mingchuno/connect-mongo
Advanced tools
Comparing version 3.0.0 to 3.0.1
{ | ||
"name": "@mingchuno/connect-mongo", | ||
"version": "3.0.0", | ||
"version": "3.0.1", | ||
"description": "MongoDB session store for Express and Connect", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -72,3 +72,2 @@ 'use strict' | ||
this.ttl = options.ttl || 1209600 // 14 days | ||
this.dbName = options.dbName || 'mongo-sessions' | ||
this.collectionName = options.collection || 'sessions' | ||
@@ -116,7 +115,3 @@ this.autoRemove = options.autoRemove || 'native' | ||
this.client = client | ||
if (typeof client.db !== 'function') { | ||
this.db = client.db | ||
} else { | ||
this.db = client.db(this.dbName) | ||
} | ||
this.db = typeof client.db !== 'function' ? client.db : client.db() | ||
return this | ||
@@ -123,0 +118,0 @@ .setCollection(this.db.collection(this.collectionName)) |
24318
6
268