diff options
author | Chocobozzz <me@florianbigard.com> | 2020-07-24 15:05:51 +0200 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2020-07-31 11:35:19 +0200 |
commit | edbc9325462ddf4536775871ebc25e06f46612d1 (patch) | |
tree | 9671dd51303e75d48d4f4f9a1df7a1960e33780d /server/initializers | |
parent | 20516920d2b72c8a18bc24b9740f7176aa962da2 (diff) | |
download | PeerTube-edbc9325462ddf4536775871ebc25e06f46612d1.tar.gz PeerTube-edbc9325462ddf4536775871ebc25e06f46612d1.tar.zst PeerTube-edbc9325462ddf4536775871ebc25e06f46612d1.zip |
Add server API to abuse messages
Diffstat (limited to 'server/initializers')
-rw-r--r-- | server/initializers/constants.ts | 3 | ||||
-rw-r--r-- | server/initializers/database.ts | 2 |
2 files changed, 5 insertions, 0 deletions
diff --git a/server/initializers/constants.ts b/server/initializers/constants.ts index fd5bf5868..a40a22395 100644 --- a/server/initializers/constants.ts +++ b/server/initializers/constants.ts | |||
@@ -206,6 +206,9 @@ const CONSTRAINTS_FIELDS = { | |||
206 | REASON: { min: 2, max: 3000 }, // Length | 206 | REASON: { min: 2, max: 3000 }, // Length |
207 | MODERATION_COMMENT: { min: 2, max: 3000 } // Length | 207 | MODERATION_COMMENT: { min: 2, max: 3000 } // Length |
208 | }, | 208 | }, |
209 | ABUSE_MESSAGES: { | ||
210 | MESSAGE: { min: 2, max: 3000 } // Length | ||
211 | }, | ||
209 | VIDEO_BLACKLIST: { | 212 | VIDEO_BLACKLIST: { |
210 | REASON: { min: 2, max: 300 } // Length | 213 | REASON: { min: 2, max: 300 } // Length |
211 | }, | 214 | }, |
diff --git a/server/initializers/database.ts b/server/initializers/database.ts index 0775f1fad..8ce32f6fa 100644 --- a/server/initializers/database.ts +++ b/server/initializers/database.ts | |||
@@ -1,6 +1,7 @@ | |||
1 | import { QueryTypes, Transaction } from 'sequelize' | 1 | import { QueryTypes, Transaction } from 'sequelize' |
2 | import { Sequelize as SequelizeTypescript } from 'sequelize-typescript' | 2 | import { Sequelize as SequelizeTypescript } from 'sequelize-typescript' |
3 | import { AbuseModel } from '@server/models/abuse/abuse' | 3 | import { AbuseModel } from '@server/models/abuse/abuse' |
4 | import { AbuseMessageModel } from '@server/models/abuse/abuse-message' | ||
4 | import { VideoAbuseModel } from '@server/models/abuse/video-abuse' | 5 | import { VideoAbuseModel } from '@server/models/abuse/video-abuse' |
5 | import { VideoCommentAbuseModel } from '@server/models/abuse/video-comment-abuse' | 6 | import { VideoCommentAbuseModel } from '@server/models/abuse/video-comment-abuse' |
6 | import { isTestInstance } from '../helpers/core-utils' | 7 | import { isTestInstance } from '../helpers/core-utils' |
@@ -87,6 +88,7 @@ async function initDatabaseModels (silent: boolean) { | |||
87 | TagModel, | 88 | TagModel, |
88 | AccountVideoRateModel, | 89 | AccountVideoRateModel, |
89 | UserModel, | 90 | UserModel, |
91 | AbuseMessageModel, | ||
90 | AbuseModel, | 92 | AbuseModel, |
91 | VideoCommentAbuseModel, | 93 | VideoCommentAbuseModel, |
92 | VideoAbuseModel, | 94 | VideoAbuseModel, |