diff options
-rw-r--r-- | server.ts | 6 | ||||
-rw-r--r-- | server/helpers/audit-logger.ts | 12 | ||||
-rw-r--r-- | tsconfig.base.json | 6 |
3 files changed, 14 insertions, 10 deletions
@@ -221,18 +221,18 @@ app.use('/', downloadRouter) | |||
221 | app.use('/', lazyStaticRouter) | 221 | app.use('/', lazyStaticRouter) |
222 | 222 | ||
223 | // Client files, last valid routes! | 223 | // Client files, last valid routes! |
224 | const cliOptions = cli.opts() | 224 | const cliOptions = cli.opts<{ client: boolean, plugins: boolean }>() |
225 | if (cliOptions.client) app.use('/', clientsRouter) | 225 | if (cliOptions.client) app.use('/', clientsRouter) |
226 | 226 | ||
227 | // ----------- Errors ----------- | 227 | // ----------- Errors ----------- |
228 | 228 | ||
229 | // Catch unmatched routes | 229 | // Catch unmatched routes |
230 | app.use((req, res: express.Response) => { | 230 | app.use((_req, res: express.Response) => { |
231 | res.status(HttpStatusCode.NOT_FOUND_404).end() | 231 | res.status(HttpStatusCode.NOT_FOUND_404).end() |
232 | }) | 232 | }) |
233 | 233 | ||
234 | // Catch thrown errors | 234 | // Catch thrown errors |
235 | app.use((err, req, res: express.Response, next) => { | 235 | app.use((err, _req, res: express.Response, _next) => { |
236 | // Format error to be logged | 236 | // Format error to be logged |
237 | let error = 'Unknown error.' | 237 | let error = 'Unknown error.' |
238 | if (err) { | 238 | if (err) { |
diff --git a/server/helpers/audit-logger.ts b/server/helpers/audit-logger.ts index 79ef44be1..076b7f11d 100644 --- a/server/helpers/audit-logger.ts +++ b/server/helpers/audit-logger.ts | |||
@@ -120,7 +120,7 @@ const videoKeysToKeep = [ | |||
120 | 'downloadEnabled' | 120 | 'downloadEnabled' |
121 | ] | 121 | ] |
122 | class VideoAuditView extends EntityAuditView { | 122 | class VideoAuditView extends EntityAuditView { |
123 | constructor (private readonly video: VideoDetails) { | 123 | constructor (video: VideoDetails) { |
124 | super(videoKeysToKeep, 'video', video) | 124 | super(videoKeysToKeep, 'video', video) |
125 | } | 125 | } |
126 | } | 126 | } |
@@ -131,7 +131,7 @@ const videoImportKeysToKeep = [ | |||
131 | 'video-name' | 131 | 'video-name' |
132 | ] | 132 | ] |
133 | class VideoImportAuditView extends EntityAuditView { | 133 | class VideoImportAuditView extends EntityAuditView { |
134 | constructor (private readonly videoImport: VideoImport) { | 134 | constructor (videoImport: VideoImport) { |
135 | super(videoImportKeysToKeep, 'video-import', videoImport) | 135 | super(videoImportKeysToKeep, 'video-import', videoImport) |
136 | } | 136 | } |
137 | } | 137 | } |
@@ -150,7 +150,7 @@ const commentKeysToKeep = [ | |||
150 | 'account-name' | 150 | 'account-name' |
151 | ] | 151 | ] |
152 | class CommentAuditView extends EntityAuditView { | 152 | class CommentAuditView extends EntityAuditView { |
153 | constructor (private readonly comment: VideoComment) { | 153 | constructor (comment: VideoComment) { |
154 | super(commentKeysToKeep, 'comment', comment) | 154 | super(commentKeysToKeep, 'comment', comment) |
155 | } | 155 | } |
156 | } | 156 | } |
@@ -179,7 +179,7 @@ const userKeysToKeep = [ | |||
179 | 'videoChannels' | 179 | 'videoChannels' |
180 | ] | 180 | ] |
181 | class UserAuditView extends EntityAuditView { | 181 | class UserAuditView extends EntityAuditView { |
182 | constructor (private readonly user: User) { | 182 | constructor (user: User) { |
183 | super(userKeysToKeep, 'user', user) | 183 | super(userKeysToKeep, 'user', user) |
184 | } | 184 | } |
185 | } | 185 | } |
@@ -205,7 +205,7 @@ const channelKeysToKeep = [ | |||
205 | 'ownerAccount-displayedName' | 205 | 'ownerAccount-displayedName' |
206 | ] | 206 | ] |
207 | class VideoChannelAuditView extends EntityAuditView { | 207 | class VideoChannelAuditView extends EntityAuditView { |
208 | constructor (private readonly channel: VideoChannel) { | 208 | constructor (channel: VideoChannel) { |
209 | super(channelKeysToKeep, 'channel', channel) | 209 | super(channelKeysToKeep, 'channel', channel) |
210 | } | 210 | } |
211 | } | 211 | } |
@@ -217,7 +217,7 @@ const abuseKeysToKeep = [ | |||
217 | 'createdAt' | 217 | 'createdAt' |
218 | ] | 218 | ] |
219 | class AbuseAuditView extends EntityAuditView { | 219 | class AbuseAuditView extends EntityAuditView { |
220 | constructor (private readonly abuse: AdminAbuse) { | 220 | constructor (abuse: AdminAbuse) { |
221 | super(abuseKeysToKeep, 'abuse', abuse) | 221 | super(abuseKeysToKeep, 'abuse', abuse) |
222 | } | 222 | } |
223 | } | 223 | } |
diff --git a/tsconfig.base.json b/tsconfig.base.json index b54d5a556..18ba8f06c 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json | |||
@@ -8,7 +8,6 @@ | |||
8 | "emitDecoratorMetadata": true, | 8 | "emitDecoratorMetadata": true, |
9 | "importHelpers": true, | 9 | "importHelpers": true, |
10 | "removeComments": true, | 10 | "removeComments": true, |
11 | "strictBindCallApply": true, | ||
12 | "esModuleInterop": true, | 11 | "esModuleInterop": true, |
13 | "forceConsistentCasingInFileNames": true, | 12 | "forceConsistentCasingInFileNames": true, |
14 | "lib": [ | 13 | "lib": [ |
@@ -27,6 +26,11 @@ | |||
27 | }, | 26 | }, |
28 | "resolveJsonModule": true, | 27 | "resolveJsonModule": true, |
29 | "strict": false, | 28 | "strict": false, |
29 | "strictBindCallApply": true, | ||
30 | "allowUnreachableCode": false, | ||
31 | "allowUnusedLabels": false, | ||
32 | "noFallthroughCasesInSwitch": true, | ||
33 | "noUnusedLocals": true, | ||
30 | "skipLibCheck": true, | 34 | "skipLibCheck": true, |
31 | "composite": true, | 35 | "composite": true, |
32 | "declarationMap": true | 36 | "declarationMap": true |