1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-06 03:50:26 +02:00

Add user history and resume videos

This commit is contained in:
Chocobozzz 2018-10-05 11:15:06 +02:00
parent a585824160
commit 6e46de095d
No known key found for this signature in database
GPG key ID: 583A612D890159BE
41 changed files with 649 additions and 122 deletions

View file

@ -154,7 +154,9 @@ function checkUserCanManageVideo (user: UserModel, video: VideoModel, right: Use
}
async function isVideoExist (id: string, res: Response, fetchType: VideoFetchType = 'all') {
const video = await fetchVideo(id, fetchType)
const userId = res.locals.oauth ? res.locals.oauth.token.User.id : undefined
const video = await fetchVideo(id, fetchType, userId)
if (video === null) {
res.status(404)