You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
main
${ noResults }
17 lines
400 B
TypeScript
17 lines
400 B
TypeScript
import 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
|
|||
}
|