Use createIndex() instead of index() to avoid deprecation warnings
This commit is contained in:
parent
0d675e94f3
commit
7172ccd72c
4 changed files with 8 additions and 8 deletions
|
|
@ -2,7 +2,7 @@ import db from '../../db/mongodb';
|
|||
|
||||
const collection = db.get('drive_files');
|
||||
|
||||
(collection as any).index('hash'); // fuck type definition
|
||||
(collection as any).createIndex('hash'); // fuck type definition
|
||||
|
||||
export default collection as any; // fuck type definition
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue