mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-05 19:42:24 +02:00
Retrieve user by id instead of username
This commit is contained in:
parent
f8be7bae3f
commit
1acb947504
3 changed files with 4 additions and 9 deletions
|
@ -130,7 +130,7 @@ async function getUserVideoImports (req: express.Request, res: express.Response)
|
|||
|
||||
async function getUserInformation (req: express.Request, res: express.Response) {
|
||||
// We did not load channels in res.locals.user
|
||||
const user = await UserModel.loadForMeAPI(res.locals.oauth.token.user.username)
|
||||
const user = await UserModel.loadForMeAPI(res.locals.oauth.token.user.id)
|
||||
|
||||
return res.json(user.toMeFormattedJSON())
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue