Fix file deletion

This commit is contained in:
Jonathan Cremin 2015-09-02 17:51:31 +02:00
parent b70e107b18
commit dbac3d7fe5
2 changed files with 2 additions and 2 deletions

View file

@ -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');

View file

@ -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);