aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib
diff options
context:
space:
mode:
Diffstat (limited to 'server/lib')
-rw-r--r--server/lib/video-channel.ts16
1 files changed, 1 insertions, 15 deletions
diff --git a/server/lib/video-channel.ts b/server/lib/video-channel.ts
index a939a23d5..beb01da9b 100644
--- a/server/lib/video-channel.ts
+++ b/server/lib/video-channel.ts
@@ -1,6 +1,5 @@
1import * as Sequelize from 'sequelize' 1import * as Sequelize from 'sequelize'
2import { VideoChannelCreate } from '../../shared/models' 2import { VideoChannelCreate } from '../../shared/models'
3import { logger } from '../helpers'
4import { database as db } from '../initializers' 3import { database as db } from '../initializers'
5import { AccountInstance } from '../models' 4import { AccountInstance } from '../models'
6import { getVideoChannelActivityPubUrl } from './activitypub/url' 5import { getVideoChannelActivityPubUrl } from './activitypub/url'
@@ -27,21 +26,8 @@ async function createVideoChannel (videoChannelInfo: VideoChannelCreate, account
27 return videoChannelCreated 26 return videoChannelCreated
28} 27}
29 28
30async function fetchVideoChannelByHostAndUUID (serverHost: string, uuid: string, t: Sequelize.Transaction) {
31 try {
32 const videoChannel = await db.VideoChannel.loadByHostAndUUID(serverHost, uuid, t)
33 if (!videoChannel) throw new Error('Video channel not found')
34
35 return videoChannel
36 } catch (err) {
37 logger.error('Cannot load video channel from host and uuid.', { error: err.stack, serverHost, uuid })
38 throw err
39 }
40}
41
42// --------------------------------------------------------------------------- 29// ---------------------------------------------------------------------------
43 30
44export { 31export {
45 createVideoChannel, 32 createVideoChannel
46 fetchVideoChannelByHostAndUUID
47} 33}