aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-01-11 13:53:08 +0100
committerChocobozzz <me@florianbigard.com>2021-01-11 13:53:08 +0100
commit1acb94750408490ce89264f92a14aceeffe81c96 (patch)
treef186a1c61a88e48d3720ad68722f42a5eeab96c1 /server/controllers
parentf8be7bae3fa70e5402bc1b32c0c4865b8b5db97e (diff)
downloadPeerTube-1acb94750408490ce89264f92a14aceeffe81c96.tar.gz
PeerTube-1acb94750408490ce89264f92a14aceeffe81c96.tar.zst
PeerTube-1acb94750408490ce89264f92a14aceeffe81c96.zip
Retrieve user by id instead of username
Diffstat (limited to 'server/controllers')
-rw-r--r--server/controllers/api/users/me.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/server/controllers/api/users/me.ts b/server/controllers/api/users/me.ts
index b786d7f59..7ab089713 100644
--- a/server/controllers/api/users/me.ts
+++ b/server/controllers/api/users/me.ts
@@ -130,7 +130,7 @@ async function getUserVideoImports (req: express.Request, res: express.Response)
130 130
131async function getUserInformation (req: express.Request, res: express.Response) { 131async function getUserInformation (req: express.Request, res: express.Response) {
132 // We did not load channels in res.locals.user 132 // We did not load channels in res.locals.user
133 const user = await UserModel.loadForMeAPI(res.locals.oauth.token.user.username) 133 const user = await UserModel.loadForMeAPI(res.locals.oauth.token.user.id)
134 134
135 return res.json(user.toMeFormattedJSON()) 135 return res.json(user.toMeFormattedJSON())
136} 136}