diff options
Diffstat (limited to 'server/controllers/api/videos/abuse.ts')
-rw-r--r-- | server/controllers/api/videos/abuse.ts | 4 |
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' |
19 | import { VideoInstance } from '../../../models' | 19 | import { VideoInstance } from '../../../models' |
20 | import { VideoAbuseCreate } from '../../../../shared' | ||
20 | 21 | ||
21 | const abuseVideoRouter = express.Router() | 22 | const abuseVideoRouter = express.Router() |
22 | 23 | ||
@@ -63,10 +64,11 @@ function reportVideoAbuseRetryWrapper (req: express.Request, res: express.Respon | |||
63 | function reportVideoAbuse (req: express.Request, res: express.Response) { | 64 | function 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 | } |