aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/initializers/constants.js
diff options
context:
space:
mode:
Diffstat (limited to 'server/initializers/constants.js')
-rw-r--r--server/initializers/constants.js19
1 files changed, 9 insertions, 10 deletions
diff --git a/server/initializers/constants.js b/server/initializers/constants.js
index 3ddf87454..1ad0c82a0 100644
--- a/server/initializers/constants.js
+++ b/server/initializers/constants.js
@@ -14,13 +14,13 @@ const PAGINATION_COUNT_DEFAULT = 15
14 14
15// Sortable columns per schema 15// Sortable columns per schema
16const SEARCHABLE_COLUMNS = { 16const SEARCHABLE_COLUMNS = {
17 VIDEOS: [ 'name', 'magnetUri', 'podHost', 'author', 'tags' ] 17 VIDEOS: [ 'name', 'magnetUri', 'host', 'author', 'tags' ]
18} 18}
19 19
20// Sortable columns per schema 20// Sortable columns per schema
21const SORTABLE_COLUMNS = { 21const SORTABLE_COLUMNS = {
22 USERS: [ 'username', '-username', 'createdDate', '-createdDate' ], 22 USERS: [ 'username', '-username', 'createdAt', '-createdAt' ],
23 VIDEOS: [ 'name', '-name', 'duration', '-duration', 'createdDate', '-createdDate' ] 23 VIDEOS: [ 'name', '-name', 'duration', '-duration', 'createdAt', '-createdAt' ]
24} 24}
25 25
26const OAUTH_LIFETIME = { 26const OAUTH_LIFETIME = {
@@ -67,9 +67,8 @@ const CONSTRAINTS_FIELDS = {
67 VIDEOS: { 67 VIDEOS: {
68 NAME: { min: 3, max: 50 }, // Length 68 NAME: { min: 3, max: 50 }, // Length
69 DESCRIPTION: { min: 3, max: 250 }, // Length 69 DESCRIPTION: { min: 3, max: 250 }, // Length
70 MAGNET: { 70 EXTNAME: [ '.mp4', '.ogv', '.webm' ],
71 INFO_HASH: { min: 10, max: 50 } // Length 71 INFO_HASH: { min: 10, max: 50 }, // Length
72 },
73 DURATION: { min: 1, max: 7200 }, // Number 72 DURATION: { min: 1, max: 7200 }, // Number
74 TAGS: { min: 1, max: 3 }, // Number of total tags 73 TAGS: { min: 1, max: 3 }, // Number of total tags
75 TAG: { min: 2, max: 10 }, // Length 74 TAG: { min: 2, max: 10 }, // Length
@@ -88,7 +87,7 @@ const FRIEND_SCORE = {
88 87
89// --------------------------------------------------------------------------- 88// ---------------------------------------------------------------------------
90 89
91const MONGO_MIGRATION_SCRIPTS = [ 90const MIGRATION_SCRIPTS = [
92 { 91 {
93 script: '0005-create-application', 92 script: '0005-create-application',
94 version: 5 93 version: 5
@@ -122,7 +121,7 @@ const MONGO_MIGRATION_SCRIPTS = [
122 version: 40 121 version: 40
123 } 122 }
124] 123]
125const LAST_MONGO_SCHEMA_VERSION = (maxBy(MONGO_MIGRATION_SCRIPTS, 'version'))['version'] 124const LAST_SQL_SCHEMA_VERSION = (maxBy(MIGRATION_SCRIPTS, 'version'))['version']
126 125
127// --------------------------------------------------------------------------- 126// ---------------------------------------------------------------------------
128 127
@@ -198,8 +197,8 @@ module.exports = {
198 CONFIG, 197 CONFIG,
199 CONSTRAINTS_FIELDS, 198 CONSTRAINTS_FIELDS,
200 FRIEND_SCORE, 199 FRIEND_SCORE,
201 LAST_MONGO_SCHEMA_VERSION, 200 LAST_SQL_SCHEMA_VERSION,
202 MONGO_MIGRATION_SCRIPTS, 201 MIGRATION_SCRIPTS,
203 OAUTH_LIFETIME, 202 OAUTH_LIFETIME,
204 PAGINATION_COUNT_DEFAULT, 203 PAGINATION_COUNT_DEFAULT,
205 PODS_SCORE, 204 PODS_SCORE,