aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/video-channel.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2017-12-12 17:53:50 +0100
committerChocobozzz <me@florianbigard.com>2017-12-13 16:50:33 +0100
commit3fd3ab2d34d512b160a5e6084d7609be7b4f4452 (patch)
treee5ca358287fca6ecacce83defcf23af1e8e9f419 /server/lib/video-channel.ts
parentc893d4514e6ecbf282c7985fe5f82b8acd8a1137 (diff)
downloadPeerTube-3fd3ab2d34d512b160a5e6084d7609be7b4f4452.tar.gz
PeerTube-3fd3ab2d34d512b160a5e6084d7609be7b4f4452.tar.zst
PeerTube-3fd3ab2d34d512b160a5e6084d7609be7b4f4452.zip
Move models to typescript-sequelize
Diffstat (limited to 'server/lib/video-channel.ts')
-rw-r--r--server/lib/video-channel.ts10
1 files changed, 5 insertions, 5 deletions
diff --git a/server/lib/video-channel.ts b/server/lib/video-channel.ts
index beb01da9b..97924aa9e 100644
--- a/server/lib/video-channel.ts
+++ b/server/lib/video-channel.ts
@@ -1,10 +1,10 @@
1import * as Sequelize from 'sequelize' 1import * as Sequelize from 'sequelize'
2import { VideoChannelCreate } from '../../shared/models' 2import { VideoChannelCreate } from '../../shared/models'
3import { database as db } from '../initializers' 3import { AccountModel } from '../models/account/account'
4import { AccountInstance } from '../models' 4import { VideoChannelModel } from '../models/video/video-channel'
5import { getVideoChannelActivityPubUrl } from './activitypub/url' 5import { getVideoChannelActivityPubUrl } from './activitypub'
6 6
7async function createVideoChannel (videoChannelInfo: VideoChannelCreate, account: AccountInstance, t: Sequelize.Transaction) { 7async function createVideoChannel (videoChannelInfo: VideoChannelCreate, account: AccountModel, t: Sequelize.Transaction) {
8 const videoChannelData = { 8 const videoChannelData = {
9 name: videoChannelInfo.name, 9 name: videoChannelInfo.name,
10 description: videoChannelInfo.description, 10 description: videoChannelInfo.description,
@@ -12,7 +12,7 @@ async function createVideoChannel (videoChannelInfo: VideoChannelCreate, account
12 accountId: account.id 12 accountId: account.id
13 } 13 }
14 14
15 const videoChannel = db.VideoChannel.build(videoChannelData) 15 const videoChannel = VideoChannelModel.build(videoChannelData)
16 videoChannel.set('url', getVideoChannelActivityPubUrl(videoChannel)) 16 videoChannel.set('url', getVideoChannelActivityPubUrl(videoChannel))
17 17
18 const options = { transaction: t } 18 const options = { transaction: t }