diff options
author | Chocobozzz <me@florianbigard.com> | 2022-06-03 16:17:28 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2022-06-03 16:17:28 +0200 |
commit | 38f57175e70fbeae89a544765bf271bdd2a8fd12 (patch) | |
tree | 6ccfceebf1d787190c1267593f9d30542e42cfe0 /server.ts | |
parent | 5d2fd66ab4a75281dab6363ba9131adee7be3a2b (diff) | |
download | PeerTube-38f57175e70fbeae89a544765bf271bdd2a8fd12.tar.gz PeerTube-38f57175e70fbeae89a544765bf271bdd2a8fd12.tar.zst PeerTube-38f57175e70fbeae89a544765bf271bdd2a8fd12.zip |
Update tsconfig
Diffstat (limited to 'server.ts')
-rw-r--r-- | server.ts | 6 |
1 files changed, 3 insertions, 3 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) { |