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.ts4
1 files changed, 3 insertions, 1 deletions
diff --git a/server/controllers/api/videos/abuse.ts b/server/controllers/api/videos/abuse.ts
index 3b1b7f58e..7d2e3bcfb 100644
--- a/server/controllers/api/videos/abuse.ts
+++ b/server/controllers/api/videos/abuse.ts
@@ -17,6 +17,7 @@ import {
17 setPagination 17 setPagination
18} from '../../../middlewares' 18} from '../../../middlewares'
19import { VideoInstance } from '../../../models' 19import { VideoInstance } from '../../../models'
20import { VideoAbuseCreate } from '../../../../shared'
20 21
21const abuseVideoRouter = express.Router() 22const abuseVideoRouter = express.Router()
22 23
@@ -63,10 +64,11 @@ function reportVideoAbuseRetryWrapper (req: express.Request, res: express.Respon
63function reportVideoAbuse (req: express.Request, res: express.Response) { 64function reportVideoAbuse (req: express.Request, res: express.Response) {
64 const videoInstance = res.locals.video 65 const videoInstance = res.locals.video
65 const reporterUsername = res.locals.oauth.token.User.username 66 const reporterUsername = res.locals.oauth.token.User.username
67 const body: VideoAbuseCreate = req.body
66 68
67 const abuse = { 69 const abuse = {
68 reporterUsername, 70 reporterUsername,
69 reason: req.body.reason, 71 reason: body.reason,
70 videoId: videoInstance.id, 72 videoId: videoInstance.id,
71 reporterPodId: null // This is our pod that reported this abuse 73 reporterPodId: null // This is our pod that reported this abuse
72 } 74 }