1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-06 03:50:26 +02:00

Refactor server errors handler

This commit is contained in:
Chocobozzz 2021-06-02 18:15:41 +02:00
parent 463206948d
commit e030bfb59d
No known key found for this signature in database
GPG key ID: 583A612D890159BE
20 changed files with 236 additions and 60 deletions

13
server/middlewares/doc.ts Normal file
View file

@ -0,0 +1,13 @@
import * as express from 'express'
function docMiddleware (docUrl: string) {
return (req: express.Request, res: express.Response, next: express.NextFunction) => {
res.locals.docUrl = docUrl
if (next) return next()
}
}
export {
docMiddleware
}