This commit is contained in:
Chocobozzz
2022-07-13 11:58:01 +02:00
parent e45dd87b93
commit ba2684cedd
44 changed files with 93 additions and 63 deletions

View File

@@ -226,7 +226,7 @@ async function registerUser (req: express.Request, res: express.Response) {
})
const { user, account, videoChannel } = await createUserAccountAndChannelAndPlaylist({
userToCreate: userToCreate,
userToCreate,
userDisplayName: body.displayName || undefined,
channelNames: body.channel
})

View File

@@ -274,7 +274,7 @@ async function buildVideo (channelId: number, body: VideoImportCreate, importDat
support: body.support || null,
privacy: body.privacy || VideoPrivacy.PRIVATE,
duration: 0, // duration will be set by the import job
channelId: channelId,
channelId,
originallyPublishedAt: body.originallyPublishedAt
? new Date(body.originallyPublishedAt)
: importData.originallyPublishedAt

View File

@@ -39,7 +39,7 @@ async function viewVideo (req: express.Request, res: express.Response) {
})
if (successView) {
Hooks.runAction('action:api.video.viewed', { video: video, ip, req, res })
Hooks.runAction('action:api.video.viewed', { video, ip, req, res })
}
await updateUserHistoryIfNeeded(body, video, res)

View File

@@ -141,7 +141,7 @@ function buildOEmbed (options: {
html,
width: embedWidth,
height: embedHeight,
title: title,
title,
author_name: channel.name,
author_url: channel.Actor.url,
provider_name: 'PeerTube',