1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-03 17:59:37 +02:00

Add ability to get user from file token

This commit is contained in:
Chocobozzz 2022-12-20 09:15:49 +01:00
parent 93293ca788
commit 868314e8bf
No known key found for this signature in database
GPG key ID: 583A612D890159BE
7 changed files with 64 additions and 31 deletions

View file

@ -245,7 +245,7 @@ function buildUserHelpers () {
},
getAuthUser: (res: express.Response) => {
const user = res.locals.oauth?.token?.User
const user = res.locals.oauth?.token?.User || res.locals.videoFileToken?.user
if (!user) return undefined
return UserModel.loadByIdFull(user.id)