aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/api/videos/abuse.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2017-12-14 17:38:41 +0100
committerChocobozzz <me@florianbigard.com>2017-12-19 10:53:16 +0100
commit50d6de9c286abcb34ff4234d56d9cbb803db7665 (patch)
treef1732b27edcd05c7877a8358b8312f1e38c287ed /server/controllers/api/videos/abuse.ts
parentfadf619ad61a016c1c7fc53de5a8f398a4f77519 (diff)
downloadPeerTube-50d6de9c286abcb34ff4234d56d9cbb803db7665.tar.gz
PeerTube-50d6de9c286abcb34ff4234d56d9cbb803db7665.tar.zst
PeerTube-50d6de9c286abcb34ff4234d56d9cbb803db7665.zip
Begin moving video channel to actor
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