aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers
diff options
context:
space:
mode:
Diffstat (limited to 'server/controllers')
-rw-r--r--server/controllers/activitypub/client.ts4
-rw-r--r--server/controllers/api/video-channel.ts3
2 files changed, 4 insertions, 3 deletions
diff --git a/server/controllers/activitypub/client.ts b/server/controllers/activitypub/client.ts
index 98f5c8865..453ced8bf 100644
--- a/server/controllers/activitypub/client.ts
+++ b/server/controllers/activitypub/client.ts
@@ -214,7 +214,7 @@ async function videoController (req: express.Request, res: express.Response) {
214 214
215 // We need captions to render AP object 215 // We need captions to render AP object
216 const captions = await VideoCaptionModel.listVideoCaptions(video.id) 216 const captions = await VideoCaptionModel.listVideoCaptions(video.id)
217 const videoWithCaptions: MVideoAPWithoutCaption = Object.assign(video, { VideoCaptions: captions }) 217 const videoWithCaptions = Object.assign(video, { VideoCaptions: captions })
218 218
219 const audience = getAudience(videoWithCaptions.VideoChannel.Account.Actor, videoWithCaptions.privacy === VideoPrivacy.PUBLIC) 219 const audience = getAudience(videoWithCaptions.VideoChannel.Account.Actor, videoWithCaptions.privacy === VideoPrivacy.PUBLIC)
220 const videoObject = audiencify(videoWithCaptions.toActivityPubObject(), audience) 220 const videoObject = audiencify(videoWithCaptions.toActivityPubObject(), audience)
@@ -351,7 +351,7 @@ async function videoPlaylistController (req: express.Request, res: express.Respo
351} 351}
352 352
353async function videoPlaylistElementController (req: express.Request, res: express.Response) { 353async function videoPlaylistElementController (req: express.Request, res: express.Response) {
354 const videoPlaylistElement = res.locals.videoPlaylistElement 354 const videoPlaylistElement = res.locals.videoPlaylistElementAP
355 355
356 const json = videoPlaylistElement.toActivityPubObject() 356 const json = videoPlaylistElement.toActivityPubObject()
357 return activityPubResponse(activityPubContextify(json), res) 357 return activityPubResponse(activityPubContextify(json), res)
diff --git a/server/controllers/api/video-channel.ts b/server/controllers/api/video-channel.ts
index d4ca7a0af..acc5b2987 100644
--- a/server/controllers/api/video-channel.ts
+++ b/server/controllers/api/video-channel.ts
@@ -35,6 +35,7 @@ import { VideoPlaylistModel } from '../../models/video/video-playlist'
35import { commonVideoPlaylistFiltersValidator } from '../../middlewares/validators/videos/video-playlists' 35import { commonVideoPlaylistFiltersValidator } from '../../middlewares/validators/videos/video-playlists'
36import { CONFIG } from '../../initializers/config' 36import { CONFIG } from '../../initializers/config'
37import { sequelizeTypescript } from '../../initializers/database' 37import { sequelizeTypescript } from '../../initializers/database'
38import { MChannelAccountDefault } from '@server/typings/models'
38 39
39const auditLogger = auditLoggerFactory('channels') 40const auditLogger = auditLoggerFactory('channels')
40const reqAvatarFile = createReqFiles([ 'avatarfile' ], MIMETYPES.IMAGE.MIMETYPE_EXT, { avatarfile: CONFIG.STORAGE.TMP_DIR }) 41const reqAvatarFile = createReqFiles([ 'avatarfile' ], MIMETYPES.IMAGE.MIMETYPE_EXT, { avatarfile: CONFIG.STORAGE.TMP_DIR })
@@ -181,7 +182,7 @@ async function updateVideoChannel (req: express.Request, res: express.Response)
181 } 182 }
182 } 183 }
183 184
184 const videoChannelInstanceUpdated = await videoChannelInstance.save(sequelizeOptions) 185 const videoChannelInstanceUpdated = await videoChannelInstance.save(sequelizeOptions) as MChannelAccountDefault
185 await sendUpdateActor(videoChannelInstanceUpdated, t) 186 await sendUpdateActor(videoChannelInstanceUpdated, t)
186 187
187 auditLogger.update( 188 auditLogger.update(