[Server] Add 'hash' index to the drive_files collection

This commit is contained in:
syuilo 2017-02-01 09:29:44 +09:00
parent 07da9ff8b4
commit 81e637fb93

View File

@ -1,6 +1,10 @@
import db from '../../db/mongodb';
export default db.get('drive_files') as any; // fuck type definition
const collection = db.get('drive_files');
(collection as any).index('hash'); // fuck type definition
export default collection as any; // fuck type definition
export function validateFileName(name: string): boolean {
return (