Fix file deletion
This commit is contained in:
parent
b70e107b18
commit
dbac3d7fe5
2 changed files with 2 additions and 2 deletions
|
@ -1,7 +1,7 @@
|
||||||
import passwords from 'passwords';
|
import passwords from 'passwords';
|
||||||
import auth from 'basic-auth';
|
import auth from 'basic-auth';
|
||||||
import mongoSetup from 'mongodb-promisified';
|
import mongoSetup from 'mongodb-promisified';
|
||||||
const objectID = mongoSetup().ObjectID;
|
const objectID = mongoSetup().objectID;
|
||||||
import debugname from 'debug';
|
import debugname from 'debug';
|
||||||
const debug = debugname('hostr-api:auth');
|
const debug = debugname('hostr-api:auth');
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@ const configuredClient = new Promise((resolve, reject) => {
|
||||||
client.Reset = client.collection('reset');
|
client.Reset = client.collection('reset');
|
||||||
client.Remember.ensureIndex({'created': 1}, {expireAfterSeconds: 2592000});
|
client.Remember.ensureIndex({'created': 1}, {expireAfterSeconds: 2592000});
|
||||||
client.Files.ensureIndex({'owner': 1, 'status': 1, 'time_added': -1});
|
client.Files.ensureIndex({'owner': 1, 'status': 1, 'time_added': -1});
|
||||||
client.ObjectId = mongodb().ObjectId;
|
client.ObjectId = client.objectId = mongodb().ObjectId;
|
||||||
return resolve(client);
|
return resolve(client);
|
||||||
}).catch((e) => {
|
}).catch((e) => {
|
||||||
reject(e);
|
reject(e);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue