1
0

Initial commit 🍀

This commit is contained in:
syuilo
2016-12-29 07:49:51 +09:00
commit b3f42e62af
405 changed files with 31017 additions and 0 deletions
+7
View File
@@ -0,0 +1,7 @@
const collection = global.db.collection('apps');
collection.createIndex('name_id');
collection.createIndex('name_id_lower');
collection.createIndex('secret');
export default collection;
+1
View File
@@ -0,0 +1 @@
export default global.db.collection('appdata');
+1
View File
@@ -0,0 +1 @@
export default global.db.collection('auth_sessions');
+11
View File
@@ -0,0 +1,11 @@
export default global.db.collection('drive_files');
export function validateFileName(name: string): boolean {
return (
(name.trim().length > 0) &&
(name.length <= 200) &&
(name.indexOf('\\') === -1) &&
(name.indexOf('/') === -1) &&
(name.indexOf('..') === -1)
);
}
+8
View File
@@ -0,0 +1,8 @@
export default global.db.collection('drive_folders');
export function isValidFolderName(name: string): boolean {
return (
(name.trim().length > 0) &&
(name.length <= 200)
);
}
+1
View File
@@ -0,0 +1 @@
export default global.db.collection('drive_tags');
+1
View File
@@ -0,0 +1 @@
export default global.db.collection('favorites');
+1
View File
@@ -0,0 +1 @@
export default global.db.collection('following');
+1
View File
@@ -0,0 +1 @@
export default global.db.collection('likes');
+1
View File
@@ -0,0 +1 @@
export default global.db.collection('messaging_histories');
+1
View File
@@ -0,0 +1 @@
export default global.db.collection('messaging_messages');
+1
View File
@@ -0,0 +1 @@
export default global.db.collection('notifications');
+1
View File
@@ -0,0 +1 @@
export default global.db.collection('posts');
+1
View File
@@ -0,0 +1 @@
export default global.db.collection('signin');
+10
View File
@@ -0,0 +1,10 @@
const collection = global.db.collection('users');
collection.createIndex('username');
collection.createIndex('token');
export default collection;
export function validateUsername(username: string): boolean {
return /^[a-zA-Z0-9\-]{3,20}$/.test(username);
}
+5
View File
@@ -0,0 +1,5 @@
const collection = global.db.collection('userkeys');
collection.createIndex('key');
export default collection;