aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/user.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-04-25 10:21:38 +0200
committerChocobozzz <me@florianbigard.com>2018-04-25 13:50:48 +0200
commit6b738c7a31591a83fdcd9c78b6b1f98e543c378b (patch)
treedb771d0e99e9ff27570885fe2a6f58a7c1948fbc /server/lib/user.ts
parent48dce1c90dff4e90a4bcffefaecf157336cf904b (diff)
downloadPeerTube-6b738c7a31591a83fdcd9c78b6b1f98e543c378b.tar.gz
PeerTube-6b738c7a31591a83fdcd9c78b6b1f98e543c378b.tar.zst
PeerTube-6b738c7a31591a83fdcd9c78b6b1f98e543c378b.zip
Video channel API routes refractor
Diffstat (limited to 'server/lib/user.ts')
-rw-r--r--server/lib/user.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/server/lib/user.ts b/server/lib/user.ts
index 2ea7481e8..d019c4e71 100644
--- a/server/lib/user.ts
+++ b/server/lib/user.ts
@@ -5,6 +5,7 @@ import { AccountModel } from '../models/account/account'
5import { UserModel } from '../models/account/user' 5import { UserModel } from '../models/account/user'
6import { buildActorInstance, getAccountActivityPubUrl, setAsyncActorKeys } from './activitypub' 6import { buildActorInstance, getAccountActivityPubUrl, setAsyncActorKeys } from './activitypub'
7import { createVideoChannel } from './video-channel' 7import { createVideoChannel } from './video-channel'
8import { VideoChannelModel } from '../models/video/video-channel'
8 9
9async function createUserAccountAndChannel (userToCreate: UserModel, validateUser = true) { 10async function createUserAccountAndChannel (userToCreate: UserModel, validateUser = true) {
10 const { user, account, videoChannel } = await sequelizeTypescript.transaction(async t => { 11 const { user, account, videoChannel } = await sequelizeTypescript.transaction(async t => {
@@ -28,7 +29,7 @@ async function createUserAccountAndChannel (userToCreate: UserModel, validateUse
28 account.Actor = await setAsyncActorKeys(account.Actor) 29 account.Actor = await setAsyncActorKeys(account.Actor)
29 videoChannel.Actor = await setAsyncActorKeys(videoChannel.Actor) 30 videoChannel.Actor = await setAsyncActorKeys(videoChannel.Actor)
30 31
31 return { user, account, videoChannel } 32 return { user, account, videoChannel } as { user: UserModel, account: AccountModel, videoChannel: VideoChannelModel }
32} 33}
33 34
34async function createLocalAccountWithoutKeys ( 35async function createLocalAccountWithoutKeys (