mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2024-12-02 05:19:17 -06:00
17 lines
405 B
TypeScript
17 lines
405 B
TypeScript
import * as express from 'express'
|
|
|
|
function openapiOperationDoc (options: {
|
|
url?: string
|
|
operationId?: string
|
|
}) {
|
|
return (req: express.Request, res: express.Response, next: express.NextFunction) => {
|
|
res.locals.docUrl = options.url || 'https://docs.joinpeertube.org/api-rest-reference.html#operation/' + options.operationId
|
|
|
|
if (next) return next()
|
|
}
|
|
}
|
|
|
|
export {
|
|
openapiOperationDoc
|
|
}
|