diff options
author | Chocobozzz <me@florianbigard.com> | 2017-12-14 17:38:41 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2017-12-19 10:53:16 +0100 |
commit | 50d6de9c286abcb34ff4234d56d9cbb803db7665 (patch) | |
tree | f1732b27edcd05c7877a8358b8312f1e38c287ed /server/controllers/api/videos/abuse.ts | |
parent | fadf619ad61a016c1c7fc53de5a8f398a4f77519 (diff) | |
download | PeerTube-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.ts | 20 |
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 @@ | |||
1 | import * as express from 'express' | 1 | import * as express from 'express' |
2 | import { | 2 | import { UserRight, VideoAbuseCreate } from '../../../../shared' |
3 | logger, | 3 | import { getFormattedObjects, logger, retryTransactionWrapper } from '../../../helpers' |
4 | getFormattedObjects, | ||
5 | retryTransactionWrapper | ||
6 | } from '../../../helpers' | ||
7 | import { sequelizeTypescript } from '../../../initializers' | 4 | import { sequelizeTypescript } from '../../../initializers' |
5 | import { sendVideoAbuse } from '../../../lib/activitypub/send' | ||
8 | import { | 6 | import { |
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' |
18 | import { VideoAbuseCreate, UserRight } from '../../../../shared' | ||
19 | import { sendVideoAbuse } from '../../../lib/index' | ||
20 | import { AccountModel } from '../../../models/account/account' | 16 | import { AccountModel } from '../../../models/account/account' |
21 | import { VideoModel } from '../../../models/video/video' | 17 | import { VideoModel } from '../../../models/video/video' |
22 | import { VideoAbuseModel } from '../../../models/video/video-abuse' | 18 | import { 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 | ||