From ba2684ceddf9b76312635b9cddc6bf6975ce436a Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 13 Jul 2022 11:58:01 +0200 Subject: Fix lint --- server/controllers/api/users/index.ts | 2 +- server/controllers/api/videos/import.ts | 2 +- server/controllers/api/videos/view.ts | 2 +- server/controllers/services.ts | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'server/controllers') diff --git a/server/controllers/api/users/index.ts b/server/controllers/api/users/index.ts index 46e80d56d..7761ba602 100644 --- a/server/controllers/api/users/index.ts +++ b/server/controllers/api/users/index.ts @@ -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 }) diff --git a/server/controllers/api/videos/import.ts b/server/controllers/api/videos/import.ts index 44283e266..7576e77e7 100644 --- a/server/controllers/api/videos/import.ts +++ b/server/controllers/api/videos/import.ts @@ -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 diff --git a/server/controllers/api/videos/view.ts b/server/controllers/api/videos/view.ts index dee1ec67c..a747fa334 100644 --- a/server/controllers/api/videos/view.ts +++ b/server/controllers/api/videos/view.ts @@ -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) diff --git a/server/controllers/services.ts b/server/controllers/services.ts index 70d08ab69..cabcbc00b 100644 --- a/server/controllers/services.ts +++ b/server/controllers/services.ts @@ -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', -- cgit v1.2.3