mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-04 02:09:37 +02:00
Video channel API routes refractor
This commit is contained in:
parent
48dce1c90d
commit
6b738c7a31
18 changed files with 383 additions and 141 deletions
|
@ -5,6 +5,7 @@ import { AccountModel } from '../models/account/account'
|
|||
import { UserModel } from '../models/account/user'
|
||||
import { buildActorInstance, getAccountActivityPubUrl, setAsyncActorKeys } from './activitypub'
|
||||
import { createVideoChannel } from './video-channel'
|
||||
import { VideoChannelModel } from '../models/video/video-channel'
|
||||
|
||||
async function createUserAccountAndChannel (userToCreate: UserModel, validateUser = true) {
|
||||
const { user, account, videoChannel } = await sequelizeTypescript.transaction(async t => {
|
||||
|
@ -28,7 +29,7 @@ async function createUserAccountAndChannel (userToCreate: UserModel, validateUse
|
|||
account.Actor = await setAsyncActorKeys(account.Actor)
|
||||
videoChannel.Actor = await setAsyncActorKeys(videoChannel.Actor)
|
||||
|
||||
return { user, account, videoChannel }
|
||||
return { user, account, videoChannel } as { user: UserModel, account: AccountModel, videoChannel: VideoChannelModel }
|
||||
}
|
||||
|
||||
async function createLocalAccountWithoutKeys (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue