diff options
Diffstat (limited to 'server/initializers/constants.ts')
-rw-r--r-- | server/initializers/constants.ts | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/server/initializers/constants.ts b/server/initializers/constants.ts index e3d779456..7be7a5f95 100644 --- a/server/initializers/constants.ts +++ b/server/initializers/constants.ts | |||
@@ -14,7 +14,7 @@ import { FollowState } from '../../shared/models/accounts/follow.model' | |||
14 | 14 | ||
15 | // --------------------------------------------------------------------------- | 15 | // --------------------------------------------------------------------------- |
16 | 16 | ||
17 | const LAST_MIGRATION_VERSION = 110 | 17 | const LAST_MIGRATION_VERSION = 120 |
18 | 18 | ||
19 | // --------------------------------------------------------------------------- | 19 | // --------------------------------------------------------------------------- |
20 | 20 | ||
@@ -25,11 +25,6 @@ const API_VERSION = 'v1' | |||
25 | const PAGINATION_COUNT_DEFAULT = 15 | 25 | const PAGINATION_COUNT_DEFAULT = 15 |
26 | 26 | ||
27 | // Sortable columns per schema | 27 | // Sortable columns per schema |
28 | const SEARCHABLE_COLUMNS = { | ||
29 | VIDEOS: [ 'name', 'magnetUri', 'host', 'account', 'tags' ] | ||
30 | } | ||
31 | |||
32 | // Sortable columns per schema | ||
33 | const SORTABLE_COLUMNS = { | 28 | const SORTABLE_COLUMNS = { |
34 | USERS: [ 'id', 'username', 'createdAt' ], | 29 | USERS: [ 'id', 'username', 'createdAt' ], |
35 | JOBS: [ 'id', 'createdAt' ], | 30 | JOBS: [ 'id', 'createdAt' ], |
@@ -60,6 +55,7 @@ const CONFIG = { | |||
60 | PASSWORD: config.get<string>('database.password') | 55 | PASSWORD: config.get<string>('database.password') |
61 | }, | 56 | }, |
62 | STORAGE: { | 57 | STORAGE: { |
58 | AVATARS_DIR: join(root(), config.get<string>('storage.avatars')), | ||
63 | LOG_DIR: join(root(), config.get<string>('storage.logs')), | 59 | LOG_DIR: join(root(), config.get<string>('storage.logs')), |
64 | VIDEOS_DIR: join(root(), config.get<string>('storage.videos')), | 60 | VIDEOS_DIR: join(root(), config.get<string>('storage.videos')), |
65 | THUMBNAILS_DIR: join(root(), config.get<string>('storage.thumbnails')), | 61 | THUMBNAILS_DIR: join(root(), config.get<string>('storage.thumbnails')), |
@@ -105,6 +101,9 @@ const CONFIG = { | |||
105 | CONFIG.WEBSERVER.URL = CONFIG.WEBSERVER.SCHEME + '://' + CONFIG.WEBSERVER.HOSTNAME + ':' + CONFIG.WEBSERVER.PORT | 101 | CONFIG.WEBSERVER.URL = CONFIG.WEBSERVER.SCHEME + '://' + CONFIG.WEBSERVER.HOSTNAME + ':' + CONFIG.WEBSERVER.PORT |
106 | CONFIG.WEBSERVER.HOST = CONFIG.WEBSERVER.HOSTNAME + ':' + CONFIG.WEBSERVER.PORT | 102 | CONFIG.WEBSERVER.HOST = CONFIG.WEBSERVER.HOSTNAME + ':' + CONFIG.WEBSERVER.PORT |
107 | 103 | ||
104 | const AVATARS_DIR = { | ||
105 | ACCOUNT: join(CONFIG.STORAGE.AVATARS_DIR, 'account') | ||
106 | } | ||
108 | // --------------------------------------------------------------------------- | 107 | // --------------------------------------------------------------------------- |
109 | 108 | ||
110 | const CONSTRAINTS_FIELDS = { | 109 | const CONSTRAINTS_FIELDS = { |
@@ -356,7 +355,7 @@ export { | |||
356 | PREVIEWS_SIZE, | 355 | PREVIEWS_SIZE, |
357 | REMOTE_SCHEME, | 356 | REMOTE_SCHEME, |
358 | FOLLOW_STATES, | 357 | FOLLOW_STATES, |
359 | SEARCHABLE_COLUMNS, | 358 | AVATARS_DIR, |
360 | SERVER_ACCOUNT_NAME, | 359 | SERVER_ACCOUNT_NAME, |
361 | PRIVATE_RSA_KEY_SIZE, | 360 | PRIVATE_RSA_KEY_SIZE, |
362 | SORTABLE_COLUMNS, | 361 | SORTABLE_COLUMNS, |