summaryrefslogtreecommitdiff
path: root/src/api/models/app.ts
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2017-01-17 09:12:33 +0900
committersyuilo <syuilotan@yahoo.co.jp>2017-01-17 09:12:33 +0900
commit87d14a9545302a02c815843c2a56c2a031a14423 (patch)
tree4483dba34e1309bba8efecc0407539ca9377d6f6 /src/api/models/app.ts
parentFix bug (diff)
downloadsharkey-87d14a9545302a02c815843c2a56c2a031a14423.tar.gz
sharkey-87d14a9545302a02c815843c2a56c2a031a14423.tar.bz2
sharkey-87d14a9545302a02c815843c2a56c2a031a14423.zip
:v:
Diffstat (limited to 'src/api/models/app.ts')
-rw-r--r--src/api/models/app.ts4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/api/models/app.ts b/src/api/models/app.ts
index 221a53906a..39bb6cfa60 100644
--- a/src/api/models/app.ts
+++ b/src/api/models/app.ts
@@ -1,4 +1,6 @@
-const collection = global.db.collection('apps');
+import db from '../../db/mongodb';
+
+const collection = db.collection('apps');
collection.createIndex('name_id');
collection.createIndex('name_id_lower');