]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/helpers/middlewares/videos.ts
Merge branch 'release/1.4.0' into develop
[github/Chocobozzz/PeerTube.git] / server / helpers / middlewares / videos.ts
index 964f0c91a1a7eb2ea32f6cf53efa57dd9f2a7718..74f529804e7abeb30494f064f1fdd59743d3c9a2 100644 (file)
@@ -2,7 +2,7 @@ import { Response } from 'express'
 import { fetchVideo, VideoFetchType } from '../video'
 import { UserRight } from '../../../shared/models/users'
 import { VideoChannelModel } from '../../models/video/video-channel'
-import { MUser, MUserAccountId, MVideoAccountLight, MVideoFullLight, MVideoWithRights } from '@server/typings/models'
+import { MUser, MUserAccountId, MVideoAccountLight, MVideoFullLight, MVideoThumbnail, MVideoWithRights } from '@server/typings/models'
 
 async function doesVideoExist (id: number | string, res: Response, fetchType: VideoFetchType = 'all') {
   const userId = res.locals.oauth ? res.locals.oauth.token.User.id : undefined
@@ -27,7 +27,7 @@ async function doesVideoExist (id: number | string, res: Response, fetchType: Vi
       break
 
     case 'only-video':
-      res.locals.onlyVideo = video
+      res.locals.onlyVideo = video as MVideoThumbnail
       break
 
     case 'only-video-with-rights':