Use createIndex() instead of index() to avoid deprecation warnings

This commit is contained in:
syuilo
2017-08-27 16:53:15 +09:00
parent 0d675e94f3
commit 7172ccd72c
4 changed files with 8 additions and 8 deletions

View File

@ -2,7 +2,7 @@ import db from '../../db/mongodb';
const collection = db.get('access_tokens');
(collection as any).index('token'); // fuck type definition
(collection as any).index('hash'); // fuck type definition
(collection as any).createIndex('token'); // fuck type definition
(collection as any).createIndex('hash'); // fuck type definition
export default collection as any; // fuck type definition