diff options
author | Chocobozzz <me@florianbigard.com> | 2021-01-26 10:23:21 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-01-26 10:29:57 +0100 |
commit | e08ff02a9f1fb1cfbdfa8f0f602eda9419ba6cc3 (patch) | |
tree | aea8add5a1a93edb0a5aab63588bd358aa9960a3 /server/controllers/api/video-channel.ts | |
parent | d223dca0cd50010d1c4455e5eec1736b1c591aed (diff) | |
download | PeerTube-e08ff02a9f1fb1cfbdfa8f0f602eda9419ba6cc3.tar.gz PeerTube-e08ff02a9f1fb1cfbdfa8f0f602eda9419ba6cc3.tar.zst PeerTube-e08ff02a9f1fb1cfbdfa8f0f602eda9419ba6cc3.zip |
Allow webp image uploads
Diffstat (limited to 'server/controllers/api/video-channel.ts')
-rw-r--r-- | server/controllers/api/video-channel.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/server/controllers/api/video-channel.ts b/server/controllers/api/video-channel.ts index 7ac01b0ef..14bd64730 100644 --- a/server/controllers/api/video-channel.ts +++ b/server/controllers/api/video-channel.ts | |||
@@ -13,7 +13,7 @@ import { MIMETYPES } from '../../initializers/constants' | |||
13 | import { sequelizeTypescript } from '../../initializers/database' | 13 | import { sequelizeTypescript } from '../../initializers/database' |
14 | import { setAsyncActorKeys } from '../../lib/activitypub/actor' | 14 | import { setAsyncActorKeys } from '../../lib/activitypub/actor' |
15 | import { sendUpdateActor } from '../../lib/activitypub/send' | 15 | import { sendUpdateActor } from '../../lib/activitypub/send' |
16 | import { deleteActorAvatarFile, updateActorAvatarFile } from '../../lib/avatar' | 16 | import { deleteLocalActorAvatarFile, updateLocalActorAvatarFile } from '../../lib/avatar' |
17 | import { JobQueue } from '../../lib/job-queue' | 17 | import { JobQueue } from '../../lib/job-queue' |
18 | import { createLocalVideoChannel, federateAllVideosOfChannel } from '../../lib/video-channel' | 18 | import { createLocalVideoChannel, federateAllVideosOfChannel } from '../../lib/video-channel' |
19 | import { | 19 | import { |
@@ -140,7 +140,7 @@ async function updateVideoChannelAvatar (req: express.Request, res: express.Resp | |||
140 | const videoChannel = res.locals.videoChannel | 140 | const videoChannel = res.locals.videoChannel |
141 | const oldVideoChannelAuditKeys = new VideoChannelAuditView(videoChannel.toFormattedJSON()) | 141 | const oldVideoChannelAuditKeys = new VideoChannelAuditView(videoChannel.toFormattedJSON()) |
142 | 142 | ||
143 | const avatar = await updateActorAvatarFile(videoChannel, avatarPhysicalFile) | 143 | const avatar = await updateLocalActorAvatarFile(videoChannel, avatarPhysicalFile) |
144 | 144 | ||
145 | auditLogger.update(getAuditIdFromRes(res), new VideoChannelAuditView(videoChannel.toFormattedJSON()), oldVideoChannelAuditKeys) | 145 | auditLogger.update(getAuditIdFromRes(res), new VideoChannelAuditView(videoChannel.toFormattedJSON()), oldVideoChannelAuditKeys) |
146 | 146 | ||
@@ -154,7 +154,7 @@ async function updateVideoChannelAvatar (req: express.Request, res: express.Resp | |||
154 | async function deleteVideoChannelAvatar (req: express.Request, res: express.Response) { | 154 | async function deleteVideoChannelAvatar (req: express.Request, res: express.Response) { |
155 | const videoChannel = res.locals.videoChannel | 155 | const videoChannel = res.locals.videoChannel |
156 | 156 | ||
157 | await deleteActorAvatarFile(videoChannel) | 157 | await deleteLocalActorAvatarFile(videoChannel) |
158 | 158 | ||
159 | return res.sendStatus(HttpStatusCode.NO_CONTENT_204) | 159 | return res.sendStatus(HttpStatusCode.NO_CONTENT_204) |
160 | } | 160 | } |