ニジカ投稿局 https://tv.nizika.tv
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

doc.ts 400 B

12345678910111213141516
  1. import express from 'express'
  2. function openapiOperationDoc (options: {
  3. url?: string
  4. operationId?: string
  5. }) {
  6. return (req: express.Request, res: express.Response, next: express.NextFunction) => {
  7. res.locals.docUrl = options.url || 'https://docs.joinpeertube.org/api-rest-reference.html#operation/' + options.operationId
  8. if (next) return next()
  9. }
  10. }
  11. export {
  12. openapiOperationDoc
  13. }