aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/initializers/constants.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/initializers/constants.ts')
-rw-r--r--server/initializers/constants.ts14
1 files changed, 11 insertions, 3 deletions
diff --git a/server/initializers/constants.ts b/server/initializers/constants.ts
index ea561b686..a008bf4c5 100644
--- a/server/initializers/constants.ts
+++ b/server/initializers/constants.ts
@@ -3,7 +3,7 @@ import { dirname, join } from 'path'
3import { JobType, VideoRateType, VideoState } from '../../shared/models' 3import { JobType, VideoRateType, VideoState } from '../../shared/models'
4import { ActivityPubActorType } from '../../shared/models/activitypub' 4import { ActivityPubActorType } from '../../shared/models/activitypub'
5import { FollowState } from '../../shared/models/actors' 5import { FollowState } from '../../shared/models/actors'
6import { VideoPrivacy } from '../../shared/models/videos' 6import { VideoPrivacy, VideoAbuseState } from '../../shared/models/videos'
7// Do not use barrels, remain constants as independent as possible 7// Do not use barrels, remain constants as independent as possible
8import { buildPath, isTestInstance, root, sanitizeHost, sanitizeUrl } from '../helpers/core-utils' 8import { buildPath, isTestInstance, root, sanitizeHost, sanitizeUrl } from '../helpers/core-utils'
9import { NSFWPolicyType } from '../../shared/models/videos/nsfw-policy.type' 9import { NSFWPolicyType } from '../../shared/models/videos/nsfw-policy.type'
@@ -15,7 +15,7 @@ let config: IConfig = require('config')
15 15
16// --------------------------------------------------------------------------- 16// ---------------------------------------------------------------------------
17 17
18const LAST_MIGRATION_VERSION = 245 18const LAST_MIGRATION_VERSION = 250
19 19
20// --------------------------------------------------------------------------- 20// ---------------------------------------------------------------------------
21 21
@@ -258,7 +258,8 @@ const CONSTRAINTS_FIELDS = {
258 BLOCKED_REASON: { min: 3, max: 250 } // Length 258 BLOCKED_REASON: { min: 3, max: 250 } // Length
259 }, 259 },
260 VIDEO_ABUSES: { 260 VIDEO_ABUSES: {
261 REASON: { min: 2, max: 300 } // Length 261 REASON: { min: 2, max: 300 }, // Length
262 MODERATION_COMMENT: { min: 2, max: 300 } // Length
262 }, 263 },
263 VIDEO_CHANNELS: { 264 VIDEO_CHANNELS: {
264 NAME: { min: 3, max: 120 }, // Length 265 NAME: { min: 3, max: 120 }, // Length
@@ -409,6 +410,12 @@ const VIDEO_IMPORT_STATES = {
409 [VideoImportState.SUCCESS]: 'Success' 410 [VideoImportState.SUCCESS]: 'Success'
410} 411}
411 412
413const VIDEO_ABUSE_STATES = {
414 [VideoAbuseState.PENDING]: 'Pending',
415 [VideoAbuseState.REJECTED]: 'Rejected',
416 [VideoAbuseState.ACCEPTED]: 'Accepted'
417}
418
412const VIDEO_MIMETYPE_EXT = { 419const VIDEO_MIMETYPE_EXT = {
413 'video/webm': '.webm', 420 'video/webm': '.webm',
414 'video/ogg': '.ogv', 421 'video/ogg': '.ogv',
@@ -625,6 +632,7 @@ export {
625 VIDEO_MIMETYPE_EXT, 632 VIDEO_MIMETYPE_EXT,
626 VIDEO_TRANSCODING_FPS, 633 VIDEO_TRANSCODING_FPS,
627 FFMPEG_NICE, 634 FFMPEG_NICE,
635 VIDEO_ABUSE_STATES,
628 JOB_REQUEST_TIMEOUT, 636 JOB_REQUEST_TIMEOUT,
629 USER_PASSWORD_RESET_LIFETIME, 637 USER_PASSWORD_RESET_LIFETIME,
630 IMAGE_MIMETYPE_EXT, 638 IMAGE_MIMETYPE_EXT,