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:
parent
93293ca788
commit
868314e8bf
7 changed files with 64 additions and 31 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue