aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-07-13 11:58:01 +0200
committerChocobozzz <me@florianbigard.com>2022-07-13 12:14:26 +0200
commitba2684ceddf9b76312635b9cddc6bf6975ce436a (patch)
treed7c9618b9a6f632029d809d8bf342adc26c85cc8 /server/lib
parente45dd87b93c621c606415f9e8d0d381de6d7a2d7 (diff)
downloadPeerTube-ba2684ceddf9b76312635b9cddc6bf6975ce436a.tar.gz
PeerTube-ba2684ceddf9b76312635b9cddc6bf6975ce436a.tar.zst
PeerTube-ba2684ceddf9b76312635b9cddc6bf6975ce436a.zip
Fix lint
Diffstat (limited to 'server/lib')
-rw-r--r--server/lib/activitypub/actors/shared/url-to-object.ts4
-rw-r--r--server/lib/auth/external-auth.ts2
-rw-r--r--server/lib/blocklist.ts2
-rw-r--r--server/lib/moderation.ts4
-rw-r--r--server/lib/opentelemetry/tracing.ts2
-rw-r--r--server/lib/plugins/plugin-manager.ts2
-rw-r--r--server/lib/plugins/video-constant-manager-factory.ts2
-rw-r--r--server/lib/user.ts6
-rw-r--r--server/lib/video.ts4
9 files changed, 14 insertions, 14 deletions
diff --git a/server/lib/activitypub/actors/shared/url-to-object.ts b/server/lib/activitypub/actors/shared/url-to-object.ts
index 7bc37f1ff..12a121725 100644
--- a/server/lib/activitypub/actors/shared/url-to-object.ts
+++ b/server/lib/activitypub/actors/shared/url-to-object.ts
@@ -11,12 +11,12 @@ async function fetchRemoteActor (actorUrl: string): Promise<{ statusCode: number
11 11
12 if (sanitizeAndCheckActorObject(body) === false) { 12 if (sanitizeAndCheckActorObject(body) === false) {
13 logger.debug('Remote actor JSON is not valid.', { actorJSON: body }) 13 logger.debug('Remote actor JSON is not valid.', { actorJSON: body })
14 return { actorObject: undefined, statusCode: statusCode } 14 return { actorObject: undefined, statusCode }
15 } 15 }
16 16
17 if (checkUrlsSameHost(body.id, actorUrl) !== true) { 17 if (checkUrlsSameHost(body.id, actorUrl) !== true) {
18 logger.warn('Actor url %s has not the same host than its AP id %s', actorUrl, body.id) 18 logger.warn('Actor url %s has not the same host than its AP id %s', actorUrl, body.id)
19 return { actorObject: undefined, statusCode: statusCode } 19 return { actorObject: undefined, statusCode }
20 } 20 }
21 21
22 return { 22 return {
diff --git a/server/lib/auth/external-auth.ts b/server/lib/auth/external-auth.ts
index 80f5064b6..053112801 100644
--- a/server/lib/auth/external-auth.ts
+++ b/server/lib/auth/external-auth.ts
@@ -166,7 +166,7 @@ function getBypassFromExternalAuth (username: string, externalAuthToken: string)
166 return { 166 return {
167 bypass: true, 167 bypass: true,
168 pluginName: npmName, 168 pluginName: npmName,
169 authName: authName, 169 authName,
170 user 170 user
171 } 171 }
172} 172}
diff --git a/server/lib/blocklist.ts b/server/lib/blocklist.ts
index 98273a6ea..a11b717b5 100644
--- a/server/lib/blocklist.ts
+++ b/server/lib/blocklist.ts
@@ -8,7 +8,7 @@ function addAccountInBlocklist (byAccountId: number, targetAccountId: number) {
8 return sequelizeTypescript.transaction(async t => { 8 return sequelizeTypescript.transaction(async t => {
9 return AccountBlocklistModel.upsert({ 9 return AccountBlocklistModel.upsert({
10 accountId: byAccountId, 10 accountId: byAccountId,
11 targetAccountId: targetAccountId 11 targetAccountId
12 }, { transaction: t }) 12 }, { transaction: t })
13 }) 13 })
14} 14}
diff --git a/server/lib/moderation.ts b/server/lib/moderation.ts
index c2565f867..c23f5b6a6 100644
--- a/server/lib/moderation.ts
+++ b/server/lib/moderation.ts
@@ -115,8 +115,8 @@ async function createVideoAbuse (options: {
115 const videoAbuseInstance: MVideoAbuseVideoFull = await VideoAbuseModel.create({ 115 const videoAbuseInstance: MVideoAbuseVideoFull = await VideoAbuseModel.create({
116 abuseId: abuseInstance.id, 116 abuseId: abuseInstance.id,
117 videoId: videoInstance.id, 117 videoId: videoInstance.id,
118 startAt: startAt, 118 startAt,
119 endAt: endAt 119 endAt
120 }, { transaction }) 120 }, { transaction })
121 121
122 videoAbuseInstance.Video = videoInstance 122 videoAbuseInstance.Video = videoInstance
diff --git a/server/lib/opentelemetry/tracing.ts b/server/lib/opentelemetry/tracing.ts
index 5358d04de..23764e9e4 100644
--- a/server/lib/opentelemetry/tracing.ts
+++ b/server/lib/opentelemetry/tracing.ts
@@ -47,7 +47,7 @@ function registerOpentelemetryTracing () {
47 }) 47 })
48 48
49 registerInstrumentations({ 49 registerInstrumentations({
50 tracerProvider: tracerProvider, 50 tracerProvider,
51 instrumentations: [ 51 instrumentations: [
52 new PgInstrumentation({ 52 new PgInstrumentation({
53 enhancedDatabaseReporting: true 53 enhancedDatabaseReporting: true
diff --git a/server/lib/plugins/plugin-manager.ts b/server/lib/plugins/plugin-manager.ts
index 1305f660f..c21ebd0c5 100644
--- a/server/lib/plugins/plugin-manager.ts
+++ b/server/lib/plugins/plugin-manager.ts
@@ -563,7 +563,7 @@ export class PluginManager implements ServerHook {
563 if (!this.hooks[options.target]) this.hooks[options.target] = [] 563 if (!this.hooks[options.target]) this.hooks[options.target] = []
564 564
565 this.hooks[options.target].push({ 565 this.hooks[options.target].push({
566 npmName: npmName, 566 npmName,
567 pluginName: plugin.name, 567 pluginName: plugin.name,
568 handler: options.handler, 568 handler: options.handler,
569 priority: options.priority || 0 569 priority: options.priority || 0
diff --git a/server/lib/plugins/video-constant-manager-factory.ts b/server/lib/plugins/video-constant-manager-factory.ts
index f04dde29f..5f7edfbe2 100644
--- a/server/lib/plugins/video-constant-manager-factory.ts
+++ b/server/lib/plugins/video-constant-manager-factory.ts
@@ -97,7 +97,7 @@ export class VideoConstantManagerFactory {
97 } 97 }
98 } 98 }
99 99
100 this.updatedVideoConstants[type][npmName].added.push({ key: key, label } as VideoConstant) 100 this.updatedVideoConstants[type][npmName].added.push({ key, label } as VideoConstant)
101 obj[key] = label 101 obj[key] = label
102 102
103 return true 103 return true
diff --git a/server/lib/user.ts b/server/lib/user.ts
index 586fd0f12..f4ffae0e4 100644
--- a/server/lib/user.ts
+++ b/server/lib/user.ts
@@ -64,8 +64,8 @@ function buildUser (options: {
64 emailVerified, 64 emailVerified,
65 adminFlags, 65 adminFlags,
66 66
67 videoQuota: videoQuota, 67 videoQuota,
68 videoQuotaDaily: videoQuotaDaily, 68 videoQuotaDaily,
69 69
70 pluginAuth 70 pluginAuth
71 }) 71 })
@@ -147,7 +147,7 @@ async function createApplicationActor (applicationId: number) {
147 const accountCreated = await createLocalAccountWithoutKeys({ 147 const accountCreated = await createLocalAccountWithoutKeys({
148 name: SERVER_ACTOR_NAME, 148 name: SERVER_ACTOR_NAME,
149 userId: null, 149 userId: null,
150 applicationId: applicationId, 150 applicationId,
151 t: undefined, 151 t: undefined,
152 type: 'Application' 152 type: 'Application'
153 }) 153 })
diff --git a/server/lib/video.ts b/server/lib/video.ts
index 86718abbe..b843b11bc 100644
--- a/server/lib/video.ts
+++ b/server/lib/video.ts
@@ -26,7 +26,7 @@ function buildLocalVideoFromReq (videoInfo: VideoCreate, channelId: number): Fil
26 description: videoInfo.description, 26 description: videoInfo.description,
27 support: videoInfo.support, 27 support: videoInfo.support,
28 privacy: videoInfo.privacy || VideoPrivacy.PRIVATE, 28 privacy: videoInfo.privacy || VideoPrivacy.PRIVATE,
29 channelId: channelId, 29 channelId,
30 originallyPublishedAt: videoInfo.originallyPublishedAt 30 originallyPublishedAt: videoInfo.originallyPublishedAt
31 ? new Date(videoInfo.originallyPublishedAt) 31 ? new Date(videoInfo.originallyPublishedAt)
32 : null 32 : null
@@ -122,7 +122,7 @@ async function addOptimizeOrMergeAudioJob (options: {
122async function addTranscodingJob (payload: VideoTranscodingPayload, options: CreateJobOptions = {}) { 122async function addTranscodingJob (payload: VideoTranscodingPayload, options: CreateJobOptions = {}) {
123 await VideoJobInfoModel.increaseOrCreate(payload.videoUUID, 'pendingTranscode') 123 await VideoJobInfoModel.increaseOrCreate(payload.videoUUID, 'pendingTranscode')
124 124
125 return JobQueue.Instance.createJobWithPromise({ type: 'video-transcoding', payload: payload }, options) 125 return JobQueue.Instance.createJobWithPromise({ type: 'video-transcoding', payload }, options)
126} 126}
127 127
128async function getTranscodingJobPriority (user: MUserId) { 128async function getTranscodingJobPriority (user: MUserId) {