aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/api/videos/abuse.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/controllers/api/videos/abuse.ts')
-rw-r--r--server/controllers/api/videos/abuse.ts20
1 files changed, 8 insertions, 12 deletions
diff --git a/server/controllers/api/videos/abuse.ts b/server/controllers/api/videos/abuse.ts
index 08cc4d0b4..fecdaf5a3 100644
--- a/server/controllers/api/videos/abuse.ts
+++ b/server/controllers/api/videos/abuse.ts
@@ -1,22 +1,18 @@
1import * as express from 'express' 1import * as express from 'express'
2import { 2import { UserRight, VideoAbuseCreate } from '../../../../shared'
3 logger, 3import { getFormattedObjects, logger, retryTransactionWrapper } from '../../../helpers'
4 getFormattedObjects,
5 retryTransactionWrapper
6} from '../../../helpers'
7import { sequelizeTypescript } from '../../../initializers' 4import { sequelizeTypescript } from '../../../initializers'
5import { sendVideoAbuse } from '../../../lib/activitypub/send'
8import { 6import {
7 asyncMiddleware,
9 authenticate, 8 authenticate,
10 ensureUserHasRight, 9 ensureUserHasRight,
11 paginationValidator, 10 paginationValidator,
12 videoAbuseReportValidator,
13 videoAbusesSortValidator,
14 setVideoAbusesSort,
15 setPagination, 11 setPagination,
16 asyncMiddleware 12 setVideoAbusesSort,
13 videoAbuseReportValidator,
14 videoAbusesSortValidator
17} from '../../../middlewares' 15} from '../../../middlewares'
18import { VideoAbuseCreate, UserRight } from '../../../../shared'
19import { sendVideoAbuse } from '../../../lib/index'
20import { AccountModel } from '../../../models/account/account' 16import { AccountModel } from '../../../models/account/account'
21import { VideoModel } from '../../../models/video/video' 17import { VideoModel } from '../../../models/video/video'
22import { VideoAbuseModel } from '../../../models/video/video-abuse' 18import { VideoAbuseModel } from '../../../models/video/video-abuse'
@@ -80,7 +76,7 @@ async function reportVideoAbuse (req: express.Request, res: express.Response) {
80 76
81 // We send the video abuse to the origin server 77 // We send the video abuse to the origin server
82 if (videoInstance.isOwned() === false) { 78 if (videoInstance.isOwned() === false) {
83 await sendVideoAbuse(reporterAccount, videoAbuseInstance, videoInstance, t) 79 await sendVideoAbuse(reporterAccount.Actor, videoAbuseInstance, videoInstance, t)
84 } 80 }
85 }) 81 })
86 82