From 7172ccd72c2ef40d68a252d7ae5cf45ddc575116 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 27 Aug 2017 16:53:15 +0900 Subject: Use createIndex() instead of index() to avoid deprecation warnings --- src/api/models/app.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/api/models/app.ts') diff --git a/src/api/models/app.ts b/src/api/models/app.ts index bf5dc80c2c..68f2f448b0 100644 --- a/src/api/models/app.ts +++ b/src/api/models/app.ts @@ -2,9 +2,9 @@ import db from '../../db/mongodb'; const collection = db.get('apps'); -(collection as any).index('name_id'); // fuck type definition -(collection as any).index('name_id_lower'); // fuck type definition -(collection as any).index('secret'); // fuck type definition +(collection as any).createIndex('name_id'); // fuck type definition +(collection as any).createIndex('name_id_lower'); // fuck type definition +(collection as any).createIndex('secret'); // fuck type definition export default collection as any; // fuck type definition -- cgit v1.2.3-freya