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/access-token.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/api/models/access-token.ts') diff --git a/src/api/models/access-token.ts b/src/api/models/access-token.ts index 2a8a512ddc..9985be5013 100644 --- a/src/api/models/access-token.ts +++ b/src/api/models/access-token.ts @@ -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 -- cgit v1.2.3-freya