X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Fhelpers%2Fmiddlewares%2Fvideos.ts;h=74f529804e7abeb30494f064f1fdd59743d3c9a2;hb=282e61e6c11f79e919c543871783fe1a00298d18;hp=964f0c91a1a7eb2ea32f6cf53efa57dd9f2a7718;hpb=453e83ea5d81d203ba34bc43cd5c2c750ba40568;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/helpers/middlewares/videos.ts b/server/helpers/middlewares/videos.ts index 964f0c91a..74f529804 100644 --- a/server/helpers/middlewares/videos.ts +++ b/server/helpers/middlewares/videos.ts @@ -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':