aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-08-25 16:14:11 +0200
committerChocobozzz <me@florianbigard.com>2021-08-26 10:01:42 +0200
commit98ab5dc81048d47d08a231f17698128f959e59b2 (patch)
tree7f74f835dc35d9f72918c56857f7f28b70d7053f /server/lib
parent851675c5591dcab1070183f0ed1b1a788de07d2c (diff)
downloadPeerTube-98ab5dc81048d47d08a231f17698128f959e59b2.tar.gz
PeerTube-98ab5dc81048d47d08a231f17698128f959e59b2.tar.zst
PeerTube-98ab5dc81048d47d08a231f17698128f959e59b2.zip
Remove useless async
Diffstat (limited to 'server/lib')
-rw-r--r--server/lib/auth/oauth.ts2
-rw-r--r--server/lib/live/shared/muxing-session.ts2
-rw-r--r--server/lib/moderation.ts4
-rw-r--r--server/lib/notifier/shared/follow/auto-follow-for-instance.ts2
-rw-r--r--server/lib/notifier/shared/follow/follow-for-instance.ts2
-rw-r--r--server/lib/notifier/shared/follow/follow-for-user.ts2
-rw-r--r--server/lib/notifier/shared/instance/new-peertube-version-for-admins.ts2
-rw-r--r--server/lib/notifier/shared/instance/new-plugin-version-for-admins.ts2
-rw-r--r--server/lib/notifier/shared/instance/registration-for-moderators.ts2
-rw-r--r--server/lib/transcoding/video-transcoding-profiles.ts4
10 files changed, 12 insertions, 12 deletions
diff --git a/server/lib/auth/oauth.ts b/server/lib/auth/oauth.ts
index 5b6130d56..a97681c86 100644
--- a/server/lib/auth/oauth.ts
+++ b/server/lib/auth/oauth.ts
@@ -81,7 +81,7 @@ async function handleOAuthToken (req: express.Request, options: { refreshTokenAu
81 }) 81 })
82} 82}
83 83
84async function handleOAuthAuthenticate ( 84function handleOAuthAuthenticate (
85 req: express.Request, 85 req: express.Request,
86 res: express.Response, 86 res: express.Response,
87 authenticateInQuery = false 87 authenticateInQuery = false
diff --git a/server/lib/live/shared/muxing-session.ts b/server/lib/live/shared/muxing-session.ts
index 9b5b6c4fc..0c9fb0cb6 100644
--- a/server/lib/live/shared/muxing-session.ts
+++ b/server/lib/live/shared/muxing-session.ts
@@ -199,7 +199,7 @@ class MuxingSession extends EventEmitter {
199 private watchMasterFile (outPath: string) { 199 private watchMasterFile (outPath: string) {
200 this.masterWatcher = chokidar.watch(outPath + '/' + this.streamingPlaylist.playlistFilename) 200 this.masterWatcher = chokidar.watch(outPath + '/' + this.streamingPlaylist.playlistFilename)
201 201
202 this.masterWatcher.on('add', async () => { 202 this.masterWatcher.on('add', () => {
203 this.emit('master-playlist-created', { videoId: this.videoId }) 203 this.emit('master-playlist-created', { videoId: this.videoId })
204 204
205 this.masterWatcher.close() 205 this.masterWatcher.close()
diff --git a/server/lib/moderation.ts b/server/lib/moderation.ts
index a42ab5b7f..456b615b2 100644
--- a/server/lib/moderation.ts
+++ b/server/lib/moderation.ts
@@ -170,8 +170,8 @@ function createAccountAbuse (options: {
170}) { 170}) {
171 const { baseAbuse, accountInstance, transaction, reporterAccount } = options 171 const { baseAbuse, accountInstance, transaction, reporterAccount } = options
172 172
173 const associateFun = async () => { 173 const associateFun = () => {
174 return { isOwned: accountInstance.isOwned() } 174 return Promise.resolve({ isOwned: accountInstance.isOwned() })
175 } 175 }
176 176
177 return createAbuse({ 177 return createAbuse({
diff --git a/server/lib/notifier/shared/follow/auto-follow-for-instance.ts b/server/lib/notifier/shared/follow/auto-follow-for-instance.ts
index 16cc62984..01d2b3563 100644
--- a/server/lib/notifier/shared/follow/auto-follow-for-instance.ts
+++ b/server/lib/notifier/shared/follow/auto-follow-for-instance.ts
@@ -35,7 +35,7 @@ export class AutoFollowForInstance extends AbstractNotification <MActorFollowFul
35 return notification 35 return notification
36 } 36 }
37 37
38 async createEmail (to: string) { 38 createEmail (to: string) {
39 const instanceUrl = this.actorFollow.ActorFollowing.url 39 const instanceUrl = this.actorFollow.ActorFollowing.url
40 40
41 return { 41 return {
diff --git a/server/lib/notifier/shared/follow/follow-for-instance.ts b/server/lib/notifier/shared/follow/follow-for-instance.ts
index 9ab269cf1..a4a2fbf53 100644
--- a/server/lib/notifier/shared/follow/follow-for-instance.ts
+++ b/server/lib/notifier/shared/follow/follow-for-instance.ts
@@ -43,7 +43,7 @@ export class FollowForInstance extends AbstractNotification <MActorFollowFull> {
43 return notification 43 return notification
44 } 44 }
45 45
46 async createEmail (to: string) { 46 createEmail (to: string) {
47 const awaitingApproval = this.actorFollow.state === 'pending' 47 const awaitingApproval = this.actorFollow.state === 'pending'
48 ? ' awaiting manual approval.' 48 ? ' awaiting manual approval.'
49 : '' 49 : ''
diff --git a/server/lib/notifier/shared/follow/follow-for-user.ts b/server/lib/notifier/shared/follow/follow-for-user.ts
index 2d0f675a8..e579d4487 100644
--- a/server/lib/notifier/shared/follow/follow-for-user.ts
+++ b/server/lib/notifier/shared/follow/follow-for-user.ts
@@ -56,7 +56,7 @@ export class FollowForUser extends AbstractNotification <MActorFollowFull> {
56 return notification 56 return notification
57 } 57 }
58 58
59 async createEmail (to: string) { 59 createEmail (to: string) {
60 const following = this.actorFollow.ActorFollowing 60 const following = this.actorFollow.ActorFollowing
61 const follower = this.actorFollow.ActorFollower 61 const follower = this.actorFollow.ActorFollower
62 62
diff --git a/server/lib/notifier/shared/instance/new-peertube-version-for-admins.ts b/server/lib/notifier/shared/instance/new-peertube-version-for-admins.ts
index ab5bfb1ac..6b5ac808a 100644
--- a/server/lib/notifier/shared/instance/new-peertube-version-for-admins.ts
+++ b/server/lib/notifier/shared/instance/new-peertube-version-for-admins.ts
@@ -41,7 +41,7 @@ export class NewPeerTubeVersionForAdmins extends AbstractNotification <NewPeerTu
41 return notification 41 return notification
42 } 42 }
43 43
44 async createEmail (to: string) { 44 createEmail (to: string) {
45 return { 45 return {
46 to, 46 to,
47 template: 'peertube-version-new', 47 template: 'peertube-version-new',
diff --git a/server/lib/notifier/shared/instance/new-plugin-version-for-admins.ts b/server/lib/notifier/shared/instance/new-plugin-version-for-admins.ts
index e5e456a70..874b10a3d 100644
--- a/server/lib/notifier/shared/instance/new-plugin-version-for-admins.ts
+++ b/server/lib/notifier/shared/instance/new-plugin-version-for-admins.ts
@@ -37,7 +37,7 @@ export class NewPluginVersionForAdmins extends AbstractNotification <MPlugin> {
37 return notification 37 return notification
38 } 38 }
39 39
40 async createEmail (to: string) { 40 createEmail (to: string) {
41 const pluginUrl = WEBSERVER.URL + '/admin/plugins/list-installed?pluginType=' + this.plugin.type 41 const pluginUrl = WEBSERVER.URL + '/admin/plugins/list-installed?pluginType=' + this.plugin.type
42 42
43 return { 43 return {
diff --git a/server/lib/notifier/shared/instance/registration-for-moderators.ts b/server/lib/notifier/shared/instance/registration-for-moderators.ts
index 4deb5a2cc..2a48ef2fa 100644
--- a/server/lib/notifier/shared/instance/registration-for-moderators.ts
+++ b/server/lib/notifier/shared/instance/registration-for-moderators.ts
@@ -36,7 +36,7 @@ export class RegistrationForModerators extends AbstractNotification <MUserDefaul
36 return notification 36 return notification
37 } 37 }
38 38
39 async createEmail (to: string) { 39 createEmail (to: string) {
40 return { 40 return {
41 template: 'user-registered', 41 template: 'user-registered',
42 to, 42 to,
diff --git a/server/lib/transcoding/video-transcoding-profiles.ts b/server/lib/transcoding/video-transcoding-profiles.ts
index bca6dfccd..a8176dca5 100644
--- a/server/lib/transcoding/video-transcoding-profiles.ts
+++ b/server/lib/transcoding/video-transcoding-profiles.ts
@@ -14,7 +14,7 @@ import { canDoQuickAudioTranscode, ffprobePromise, getAudioStream, getMaxAudioBi
14 * * https://trac.ffmpeg.org/wiki/Limiting%20the%20output%20bitrate 14 * * https://trac.ffmpeg.org/wiki/Limiting%20the%20output%20bitrate
15 */ 15 */
16 16
17const defaultX264VODOptionsBuilder: EncoderOptionsBuilder = async (options: EncoderOptionsBuilderParams) => { 17const defaultX264VODOptionsBuilder: EncoderOptionsBuilder = (options: EncoderOptionsBuilderParams) => {
18 const { fps, inputRatio, inputBitrate } = options 18 const { fps, inputRatio, inputBitrate } = options
19 if (!fps) return { outputOptions: [ ] } 19 if (!fps) return { outputOptions: [ ] }
20 20
@@ -30,7 +30,7 @@ const defaultX264VODOptionsBuilder: EncoderOptionsBuilder = async (options: Enco
30 } 30 }
31} 31}
32 32
33const defaultX264LiveOptionsBuilder: EncoderOptionsBuilder = async (options: EncoderOptionsBuilderParams) => { 33const defaultX264LiveOptionsBuilder: EncoderOptionsBuilder = (options: EncoderOptionsBuilderParams) => {
34 const { streamNum, fps, inputBitrate, inputRatio } = options 34 const { streamNum, fps, inputBitrate, inputRatio } = options
35 35
36 const targetBitrate = capBitrate(inputBitrate, getAverageBitrate({ ...options, fps, ratio: inputRatio })) 36 const targetBitrate = capBitrate(inputBitrate, getAverageBitrate({ ...options, fps, ratio: inputRatio }))