X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Fcontrollers%2Fapi%2Fvideo-channel.ts;h=1fa842d9c984b2a112c6184831666e113c5e9bb1;hb=9ccff23877ec8d740fcd5a9254fcd2424b62d2c8;hp=8fc34022430bb61dc3aff14ced7164581d71fda2;hpb=91411dba928678c15a5e99d9795ae061909e397d;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/controllers/api/video-channel.ts b/server/controllers/api/video-channel.ts index 8fc340224..1fa842d9c 100644 --- a/server/controllers/api/video-channel.ts +++ b/server/controllers/api/video-channel.ts @@ -46,7 +46,7 @@ videoChannelRouter.get('/', videoChannelRouter.post('/', authenticate, - videoChannelsAddValidator, + asyncMiddleware(videoChannelsAddValidator), asyncRetryTransactionMiddleware(addVideoChannel) ) @@ -107,13 +107,9 @@ async function updateVideoChannelAvatar (req: express.Request, res: express.Resp const videoChannel = res.locals.videoChannel as VideoChannelModel const oldVideoChannelAuditKeys = new VideoChannelAuditView(videoChannel.toFormattedJSON()) - const avatar = await updateActorAvatarFile(avatarPhysicalFile, videoChannel.Actor, videoChannel) + const avatar = await updateActorAvatarFile(avatarPhysicalFile, videoChannel) - auditLogger.update( - getAuditIdFromRes(res), - new VideoChannelAuditView(videoChannel.toFormattedJSON()), - oldVideoChannelAuditKeys - ) + auditLogger.update(getAuditIdFromRes(res), new VideoChannelAuditView(videoChannel.toFormattedJSON()), oldVideoChannelAuditKeys) return res .json({