meRouter.put('/me',
authenticate,
- usersUpdateMeValidator,
+ asyncMiddleware(usersUpdateMeValidator),
asyncRetryTransactionMiddleware(updateMe)
)
if (body.password !== undefined) user.password = body.password
if (body.email !== undefined) user.email = body.email
if (body.nsfwPolicy !== undefined) user.nsfwPolicy = body.nsfwPolicy
+ if (body.webTorrentPolicy !== undefined) user.webTorrentPolicy = body.webTorrentPolicy
if (body.autoPlayVideo !== undefined) user.autoPlayVideo = body.autoPlayVideo
await sequelizeTypescript.transaction(async t => {
const userAccount = await AccountModel.load(user.Account.id)
- const avatar = await updateActorAvatarFile(avatarPhysicalFile, userAccount.Actor, userAccount)
+ const avatar = await updateActorAvatarFile(avatarPhysicalFile, userAccount)
auditLogger.update(getAuditIdFromRes(res), new UserAuditView(user.toFormattedJSON()), oldUserAuditView)