aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/middlewares/doc.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/middlewares/doc.ts')
-rw-r--r--server/middlewares/doc.ts13
1 files changed, 13 insertions, 0 deletions
diff --git a/server/middlewares/doc.ts b/server/middlewares/doc.ts
new file mode 100644
index 000000000..aa852cd77
--- /dev/null
+++ b/server/middlewares/doc.ts
@@ -0,0 +1,13 @@
1import * as express from 'express'
2
3function docMiddleware (docUrl: string) {
4 return (req: express.Request, res: express.Response, next: express.NextFunction) => {
5 res.locals.docUrl = docUrl
6
7 if (next) return next()
8 }
9}
10
11export {
12 docMiddleware
13}