summaryrefslogtreecommitdiff
path: root/src/api/models
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2017-01-06 12:09:57 +0900
committersyuilo <syuilotan@yahoo.co.jp>2017-01-06 12:09:57 +0900
commitfef3d3f300c80bf26b0c6a203db5782f76463151 (patch)
tree4b590d2c11e2d1f031cc3fff9ef1c9c76741cdc6 /src/api/models
parent[BREAKING CHANGE] Improve security (diff)
downloadsharkey-fef3d3f300c80bf26b0c6a203db5782f76463151.tar.gz
sharkey-fef3d3f300c80bf26b0c6a203db5782f76463151.tar.bz2
sharkey-fef3d3f300c80bf26b0c6a203db5782f76463151.zip
Refactor: Rename userkey --> access-token
Diffstat (limited to 'src/api/models')
-rw-r--r--src/api/models/access-token.ts6
-rw-r--r--src/api/models/userkey.ts5
2 files changed, 6 insertions, 5 deletions
diff --git a/src/api/models/access-token.ts b/src/api/models/access-token.ts
new file mode 100644
index 0000000000..f94df954d6
--- /dev/null
+++ b/src/api/models/access-token.ts
@@ -0,0 +1,6 @@
+const collection = global.db.collection('access_tokens');
+
+collection.createIndex('token');
+collection.createIndex('hash');
+
+export default collection;
diff --git a/src/api/models/userkey.ts b/src/api/models/userkey.ts
deleted file mode 100644
index 204f283a28..0000000000
--- a/src/api/models/userkey.ts
+++ /dev/null
@@ -1,5 +0,0 @@
-const collection = global.db.collection('userkeys');
-
-collection.createIndex('key');
-
-export default collection;