mirror of https://github.com/Chocobozzz/PeerTube
Fix avatar update
parent
a5625b4167
commit
bb82394c0d
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue