aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/helpers/middlewares/video-abuses.ts
diff options
context:
space:
mode:
authorRigel Kent <sendmemail@rigelk.eu>2020-04-20 11:20:12 +0200
committerRigel Kent <par@rigelk.eu>2020-05-01 16:41:02 +0200
commit0251197e249cc03b65805ed6805da72bf4573529 (patch)
tree3aae202fd1ea24bac5cd7f2c380ffe50aae189a0 /server/helpers/middlewares/video-abuses.ts
parentb8cf27c0f86d205a279d03b83e0e6728f46da67f (diff)
downloadPeerTube-0251197e249cc03b65805ed6805da72bf4573529.tar.gz
PeerTube-0251197e249cc03b65805ed6805da72bf4573529.tar.zst
PeerTube-0251197e249cc03b65805ed6805da72bf4573529.zip
Factorize rest-table and fix/simplify SQL
Diffstat (limited to 'server/helpers/middlewares/video-abuses.ts')
-rw-r--r--server/helpers/middlewares/video-abuses.ts2
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)