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.js12
1 files changed, 11 insertions, 1 deletions
diff --git a/server/initializers/constants.js b/server/initializers/constants.js
index 5ccd42773..0efbbb916 100644
--- a/server/initializers/constants.js
+++ b/server/initializers/constants.js
@@ -1,6 +1,7 @@
1'use strict' 1'use strict'
2 2
3const config = require('config') 3const config = require('config')
4const maxBy = require('lodash/maxBy')
4const path = require('path') 5const path = require('path')
5 6
6// --------------------------------------------------------------------------- 7// ---------------------------------------------------------------------------
@@ -92,9 +93,13 @@ const MONGO_MIGRATION_SCRIPTS = [
92 { 93 {
93 script: '0015-admin-role', 94 script: '0015-admin-role',
94 version: 15 95 version: 15
96 },
97 {
98 script: '0020-requests-endpoint',
99 version: 20
95 } 100 }
96] 101]
97const LAST_MONGO_SCHEMA_VERSION = 15 102const LAST_MONGO_SCHEMA_VERSION = (maxBy(MONGO_MIGRATION_SCRIPTS, 'version'))['version']
98 103
99// --------------------------------------------------------------------------- 104// ---------------------------------------------------------------------------
100 105
@@ -116,6 +121,10 @@ const REQUESTS_LIMIT = 10
116// Number of requests to retry for replay requests module 121// Number of requests to retry for replay requests module
117const RETRY_REQUESTS = 5 122const RETRY_REQUESTS = 5
118 123
124const REQUEST_ENDPOINTS = {
125 VIDEOS: 'videos'
126}
127
119// --------------------------------------------------------------------------- 128// ---------------------------------------------------------------------------
120 129
121// Password encryption 130// Password encryption
@@ -162,6 +171,7 @@ module.exports = {
162 OAUTH_LIFETIME, 171 OAUTH_LIFETIME,
163 PAGINATION_COUNT_DEFAULT, 172 PAGINATION_COUNT_DEFAULT,
164 PODS_SCORE, 173 PODS_SCORE,
174 REQUEST_ENDPOINTS,
165 REQUESTS_IN_PARALLEL, 175 REQUESTS_IN_PARALLEL,
166 REQUESTS_INTERVAL, 176 REQUESTS_INTERVAL,
167 REQUESTS_LIMIT, 177 REQUESTS_LIMIT,