From ed56ad1193bb5bb0a81fb843a11eb90d3fed9861 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 26 Apr 2018 10:03:40 +0200 Subject: Add ability to update the user display name/description --- server/controllers/api/users.ts | 1 + 1 file changed, 1 insertion(+) (limited to 'server/controllers') diff --git a/server/controllers/api/users.ts b/server/controllers/api/users.ts index dcc4ef196..2342c23dd 100644 --- a/server/controllers/api/users.ts +++ b/server/controllers/api/users.ts @@ -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 }) -- cgit v1.2.3