From 39445ead45aaaea801ec09991b8dd2464f722e47 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 23 Nov 2017 17:36:15 +0100 Subject: Cleanup models --- server/lib/video-channel.ts | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) (limited to 'server/lib/video-channel.ts') 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 @@ import * as Sequelize from 'sequelize' import { VideoChannelCreate } from '../../shared/models' -import { logger } from '../helpers' import { database as db } from '../initializers' import { AccountInstance } from '../models' import { getVideoChannelActivityPubUrl } from './activitypub/url' @@ -27,21 +26,8 @@ async function createVideoChannel (videoChannelInfo: VideoChannelCreate, account return videoChannelCreated } -async function fetchVideoChannelByHostAndUUID (serverHost: string, uuid: string, t: Sequelize.Transaction) { - try { - const videoChannel = await db.VideoChannel.loadByHostAndUUID(serverHost, uuid, t) - if (!videoChannel) throw new Error('Video channel not found') - - return videoChannel - } catch (err) { - logger.error('Cannot load video channel from host and uuid.', { error: err.stack, serverHost, uuid }) - throw err - } -} - // --------------------------------------------------------------------------- export { - createVideoChannel, - fetchVideoChannelByHostAndUUID + createVideoChannel } -- cgit v1.2.3