diff options
author | Chocobozzz <me@florianbigard.com> | 2018-04-25 10:21:38 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-04-25 13:50:48 +0200 |
commit | 6b738c7a31591a83fdcd9c78b6b1f98e543c378b (patch) | |
tree | db771d0e99e9ff27570885fe2a6f58a7c1948fbc /server/lib/user.ts | |
parent | 48dce1c90dff4e90a4bcffefaecf157336cf904b (diff) | |
download | PeerTube-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.ts | 3 |
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' | |||
5 | import { UserModel } from '../models/account/user' | 5 | import { UserModel } from '../models/account/user' |
6 | import { buildActorInstance, getAccountActivityPubUrl, setAsyncActorKeys } from './activitypub' | 6 | import { buildActorInstance, getAccountActivityPubUrl, setAsyncActorKeys } from './activitypub' |
7 | import { createVideoChannel } from './video-channel' | 7 | import { createVideoChannel } from './video-channel' |
8 | import { VideoChannelModel } from '../models/video/video-channel' | ||
8 | 9 | ||
9 | async function createUserAccountAndChannel (userToCreate: UserModel, validateUser = true) { | 10 | async 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 | ||
34 | async function createLocalAccountWithoutKeys ( | 35 | async function createLocalAccountWithoutKeys ( |