aboutsummaryrefslogtreecommitdiffhomepage
path: root/server.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-06-03 16:17:28 +0200
committerChocobozzz <me@florianbigard.com>2022-06-03 16:17:28 +0200
commit38f57175e70fbeae89a544765bf271bdd2a8fd12 (patch)
tree6ccfceebf1d787190c1267593f9d30542e42cfe0 /server.ts
parent5d2fd66ab4a75281dab6363ba9131adee7be3a2b (diff)
downloadPeerTube-38f57175e70fbeae89a544765bf271bdd2a8fd12.tar.gz
PeerTube-38f57175e70fbeae89a544765bf271bdd2a8fd12.tar.zst
PeerTube-38f57175e70fbeae89a544765bf271bdd2a8fd12.zip
Update tsconfig
Diffstat (limited to 'server.ts')
-rw-r--r--server.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/server.ts b/server.ts
index ad162832b..559327f16 100644
--- a/server.ts
+++ b/server.ts
@@ -221,18 +221,18 @@ app.use('/', downloadRouter)
221app.use('/', lazyStaticRouter) 221app.use('/', lazyStaticRouter)
222 222
223// Client files, last valid routes! 223// Client files, last valid routes!
224const cliOptions = cli.opts() 224const cliOptions = cli.opts<{ client: boolean, plugins: boolean }>()
225if (cliOptions.client) app.use('/', clientsRouter) 225if (cliOptions.client) app.use('/', clientsRouter)
226 226
227// ----------- Errors ----------- 227// ----------- Errors -----------
228 228
229// Catch unmatched routes 229// Catch unmatched routes
230app.use((req, res: express.Response) => { 230app.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
235app.use((err, req, res: express.Response, next) => { 235app.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) {