Chocobozzz/PeerTube

View on GitHub
server/core/controllers/api/videos/comment.ts

Summary

Maintainability
A
2 hrs
Test Coverage

Function listVideoThreads has 27 lines of code (exceeds 25 allowed). Consider refactoring.
Open

async function listVideoThreads (req: express.Request, res: express.Response) {
  const video = res.locals.onlyVideo
  const user = res.locals.oauth ? res.locals.oauth.token.User : undefined

  let resultList: ThreadsResultList<MCommentFormattable>
Severity: Minor
Found in server/core/controllers/api/videos/comment.ts - About 1 hr to fix

    Function listVideoThreadComments has 27 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    async function listVideoThreadComments (req: express.Request, res: express.Response) {
      const video = res.locals.onlyVideo
      const user = res.locals.oauth ? res.locals.oauth.token.User : undefined
    
      let resultList: ResultList<MCommentFormattable>
    Severity: Minor
    Found in server/core/controllers/api/videos/comment.ts - About 1 hr to fix

      There are no issues that match your filters.

      Category
      Status