Fix avatar update

pull/175/head
Chocobozzz 2018-01-04 14:53:25 +01:00
parent a5625b4167
commit bb82394c0d
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
1 changed files with 3 additions and 2 deletions

View File

@ -249,11 +249,12 @@ async function updateMyAvatar (req: express.Request, res: express.Response, next
await unlinkPromise(source) await unlinkPromise(source)
const avatar = await sequelizeTypescript.transaction(async t => { const avatar = await sequelizeTypescript.transaction(async t => {
await updateActorAvatarInstance(actor, avatarName, t) const updatedActor = await updateActorAvatarInstance(actor, avatarName, t)
await updatedActor.save({ transaction: t })
await sendUpdateUser(user, t) await sendUpdateUser(user, t)
return avatar return updatedActor.Avatar
}) })
return res return res