diff options
Diffstat (limited to 'server/helpers/middlewares/video-abuses.ts')
-rw-r--r-- | server/helpers/middlewares/video-abuses.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/server/helpers/middlewares/video-abuses.ts b/server/helpers/middlewares/video-abuses.ts index 7553a5eb3..97a5724b6 100644 --- a/server/helpers/middlewares/video-abuses.ts +++ b/server/helpers/middlewares/video-abuses.ts | |||
@@ -7,7 +7,7 @@ async function doesVideoAbuseExist (abuseIdArg: number | string, videoUUID: stri | |||
7 | let videoAbuse = await VideoAbuseModel.loadByIdAndVideoId(abuseId, null, videoUUID) | 7 | let videoAbuse = await VideoAbuseModel.loadByIdAndVideoId(abuseId, null, videoUUID) |
8 | 8 | ||
9 | if (!videoAbuse) { | 9 | if (!videoAbuse) { |
10 | const userId = res.locals.oauth ? res.locals.oauth.token.User.id : undefined | 10 | const userId = res.locals.oauth?.token.User.id |
11 | const video = await fetchVideo(videoUUID, 'all', userId) | 11 | const video = await fetchVideo(videoUUID, 'all', userId) |
12 | 12 | ||
13 | if (video) videoAbuse = await VideoAbuseModel.loadByIdAndVideoId(abuseId, video.id) | 13 | if (video) videoAbuse = await VideoAbuseModel.loadByIdAndVideoId(abuseId, video.id) |