diff --git a/api/lib/auth.js b/api/lib/auth.js index 405b4ed..a605deb 100644 --- a/api/lib/auth.js +++ b/api/lib/auth.js @@ -1,7 +1,7 @@ import passwords from 'passwords'; import auth from 'basic-auth'; import mongoSetup from 'mongodb-promisified'; -const objectID = mongoSetup().ObjectID; +const objectID = mongoSetup().objectID; import debugname from 'debug'; const debug = debugname('hostr-api:auth'); diff --git a/lib/mongo.js b/lib/mongo.js index a1a9f84..949e428 100644 --- a/lib/mongo.js +++ b/lib/mongo.js @@ -15,7 +15,7 @@ const configuredClient = new Promise((resolve, reject) => { client.Reset = client.collection('reset'); client.Remember.ensureIndex({'created': 1}, {expireAfterSeconds: 2592000}); client.Files.ensureIndex({'owner': 1, 'status': 1, 'time_added': -1}); - client.ObjectId = mongodb().ObjectId; + client.ObjectId = client.objectId = mongodb().ObjectId; return resolve(client); }).catch((e) => { reject(e);