Chocobozzz/PeerTube

View on GitHub

Showing 1,292 of 3,313 total issues

Avoid too many return statements within this function.
Open

      return res.fail({
        status: HttpStatusCode.BAD_REQUEST_400,
        message: 'Cannot delete audio file of HLS playlist with splitted audio/video. Delete all the videos first'
      })
Severity: Major
Found in server/core/middlewares/validators/videos/video-files.ts - About 30 mins to fix

    Avoid too many return statements within this function.
    Open

        return next()
    Severity: Major
    Found in server/core/middlewares/validators/videos/video-imports.ts - About 30 mins to fix

      Avoid too many return statements within this function.
      Open

              return res.fail({
                status: HttpStatusCode.NOT_FOUND_404,
                message: 'Video not found'
              })
      Severity: Major
      Found in server/core/middlewares/validators/oembed.ts - About 30 mins to fix

        Avoid too many return statements within this function.
        Open

            return next()
        Severity: Major
        Found in server/core/middlewares/validators/server.ts - About 30 mins to fix

          Avoid too many return statements within this function.
          Open

              if (!checkInvalidLiveConfig(req.body, res)) return
          Severity: Major
          Found in server/core/middlewares/validators/config.ts - About 30 mins to fix

            Avoid too many return statements within this function.
            Open

                  return res.fail({
                    status: HttpStatusCode.FORBIDDEN_403,
                    message: 'Custom latency mode is not allowed by this instance'
                  })
            Severity: Major
            Found in server/core/middlewares/validators/videos/video-live.ts - About 30 mins to fix

              Avoid too many return statements within this function.
              Open

                    return res.fail({
                      status: HttpStatusCode.NOT_FOUND_404,
                      message: 'Video playlist not found'
                    })
              Severity: Major
              Found in server/core/middlewares/validators/oembed.ts - About 30 mins to fix

                Avoid too many return statements within this function.
                Open

                    return next()
                Severity: Major
                Found in server/core/middlewares/validators/videos/video-live.ts - About 30 mins to fix

                  Avoid too many return statements within this function.
                  Open

                      if (!checkUserCanManageVideo(user, res.locals.videoAll, UserRight.GET_ANY_LIVE, res)) return
                  Severity: Major
                  Found in server/core/middlewares/validators/videos/video-live.ts - About 30 mins to fix

                    Avoid too many return statements within this function.
                    Open

                        return next()
                    Severity: Major
                    Found in server/core/middlewares/validators/videos/video-files.ts - About 30 mins to fix

                      Avoid too many return statements within this function.
                      Open

                          return next()
                      Severity: Major
                      Found in server/core/middlewares/validators/videos/video-channels.ts - About 30 mins to fix

                        Avoid too many return statements within this function.
                        Open

                              return next()
                        Severity: Major
                        Found in server/core/middlewares/validators/oembed.ts - About 30 mins to fix

                          Avoid too many return statements within this function.
                          Open

                              if (canUserAccessVideo(user, videoWithRights, UserRight.SEE_ALL_VIDEOS)) return true
                          Severity: Major
                          Found in server/core/middlewares/validators/shared/videos.ts - About 30 mins to fix

                            Avoid too many return statements within this function.
                            Open

                                return next()
                            Severity: Major
                            Found in server/core/middlewares/validators/videos/video-playlists.ts - About 30 mins to fix

                              Avoid too many return statements within this function.
                              Open

                                    return res.fail({ message: 'Cannot update a live that has already started' })
                              Severity: Major
                              Found in server/core/middlewares/validators/videos/video-live.ts - About 30 mins to fix

                                Avoid too many return statements within this function.
                                Open

                                    return next()
                                Severity: Major
                                Found in server/core/middlewares/validators/videos/video-files.ts - About 30 mins to fix

                                  Avoid too many return statements within this function.
                                  Open

                                      return next()
                                  Severity: Major
                                  Found in server/core/middlewares/validators/videos/video-imports.ts - About 30 mins to fix

                                    Avoid too many return statements within this function.
                                    Open

                                        return next()
                                    Severity: Major
                                    Found in server/core/middlewares/validators/videos/video-passwords.ts - About 30 mins to fix

                                      Avoid too many return statements within this function.
                                      Open

                                          if (req.query.videoChannelName && !await doesVideoChannelNameWithHostExist(req.query.videoChannelName, res)) return
                                      Severity: Major
                                      Found in server/core/middlewares/validators/feeds.ts - About 30 mins to fix

                                        Avoid too many return statements within this function.
                                        Open

                                            return next()
                                        Severity: Major
                                        Found in server/core/middlewares/validators/feeds.ts - About 30 mins to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language