1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-04 18:29:27 +02:00

Add state and moderationComment for abuses on server side

This commit is contained in:
Chocobozzz 2018-08-10 16:54:01 +02:00
parent 904a463c77
commit 268eebed92
No known key found for this signature in database
GPG key ID: 583A612D890159BE
19 changed files with 482 additions and 64 deletions

View file

@ -1,4 +1,4 @@
import { ActivityCreate, VideoTorrentObject } from '../../../../shared'
import { ActivityCreate, VideoAbuseState, VideoTorrentObject } from '../../../../shared'
import { DislikeObject, VideoAbuseObject, ViewObject } from '../../../../shared/models/activitypub/objects'
import { VideoCommentObject } from '../../../../shared/models/activitypub/objects/video-comment-object'
import { retryTransactionWrapper } from '../../../helpers/database-utils'
@ -112,7 +112,8 @@ async function processCreateVideoAbuse (actor: ActorModel, videoAbuseToCreateDat
const videoAbuseData = {
reporterAccountId: account.id,
reason: videoAbuseToCreateData.content,
videoId: video.id
videoId: video.id,
state: VideoAbuseState.PENDING
}
await VideoAbuseModel.create(videoAbuseData)