+
+async function importVideosInChannel (req: express.Request, res: express.Response) {
+ const { externalChannelUrl } = req.body as VideosImportInChannelCreate
+
+ await JobQueue.Instance.createJob({
+ type: 'video-channel-import',
+ payload: {
+ externalChannelUrl,
+ videoChannelId: res.locals.videoChannel.id,
+ partOfChannelSyncId: res.locals.videoChannelSync?.id
+ }
+ })
+
+ logger.info('Video import job for channel "%s" with url "%s" created.', res.locals.videoChannel.name, externalChannelUrl)
+
+ return res.type('json').status(HttpStatusCode.NO_CONTENT_204).end()
+}