Chocobozzz/PeerTube

View on GitHub

Showing 3,313 of 3,313 total issues

Avoid too many return statements within this function.
Open

      return res.fail({ message: 'Should have a magnetUri or a targetUrl or a torrent file.' })
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

        if (!await isVideoPasswordDeletable(res)) return
    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

            return
      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

            if (!await doesVideoChannelOfAccountExist(body.channelId, user, res)) return cleanUpReqFiles(req)
        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.BAD_REQUEST_400,
                  type: ServerErrorCode.VIDEO_ALREADY_HAS_CAPTIONS,
                  message: 'This video already has captions'
                })
          Severity: Major
          Found in server/core/middlewares/validators/videos/video-captions.ts - About 30 mins to fix

            Avoid too many return statements within this function.
            Open

                  return res.fail({
                    status: HttpStatusCode.BAD_REQUEST_400,
                    message: 'Cannot delete last HLS playlist file since this video does not have Web Video files'
                  })
            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 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
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language