From 50d6de9c286abcb34ff4234d56d9cbb803db7665 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 14 Dec 2017 17:38:41 +0100 Subject: Begin moving video channel to actor --- server/controllers/api/videos/abuse.ts | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) (limited to 'server/controllers/api/videos/abuse.ts') 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 @@ import * as express from 'express' -import { - logger, - getFormattedObjects, - retryTransactionWrapper -} from '../../../helpers' +import { UserRight, VideoAbuseCreate } from '../../../../shared' +import { getFormattedObjects, logger, retryTransactionWrapper } from '../../../helpers' import { sequelizeTypescript } from '../../../initializers' +import { sendVideoAbuse } from '../../../lib/activitypub/send' import { + asyncMiddleware, authenticate, ensureUserHasRight, paginationValidator, - videoAbuseReportValidator, - videoAbusesSortValidator, - setVideoAbusesSort, setPagination, - asyncMiddleware + setVideoAbusesSort, + videoAbuseReportValidator, + videoAbusesSortValidator } from '../../../middlewares' -import { VideoAbuseCreate, UserRight } from '../../../../shared' -import { sendVideoAbuse } from '../../../lib/index' import { AccountModel } from '../../../models/account/account' import { VideoModel } from '../../../models/video/video' import { VideoAbuseModel } from '../../../models/video/video-abuse' @@ -80,7 +76,7 @@ async function reportVideoAbuse (req: express.Request, res: express.Response) { // We send the video abuse to the origin server if (videoInstance.isOwned() === false) { - await sendVideoAbuse(reporterAccount, videoAbuseInstance, videoInstance, t) + await sendVideoAbuse(reporterAccount.Actor, videoAbuseInstance, videoInstance, t) } }) -- cgit v1.2.3