]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/controllers/api/users.ts
Add ability to update the user display name/description
[github/Chocobozzz/PeerTube.git] / server / controllers / api / users.ts
index dcc4ef196b7444cef4f322deb7c8a8ef286e79f4..2342c23dd683b809ba9db028907033cb382ed04d 100644 (file)
@@ -303,6 +303,7 @@ async function updateMe (req: express.Request, res: express.Response, next: expr
   await sequelizeTypescript.transaction(async t => {
     await user.save({ transaction: t })
 
+    if (body.displayName !== undefined) user.Account.name = body.displayName
     if (body.description !== undefined) user.Account.description = body.description
     await user.Account.save({ transaction: t })