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({
        status: HttpStatusCode.CONFLICT_409,
        message: 'This video is already duplicated by your instance.'
      })
Severity: Major
Found in server/core/middlewares/validators/redundancy.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/redundancy.ts - About 30 mins to fix

      Avoid too many return statements within this function.
      Open

            return res.fail({ message: 'Invalid video or playlist id.' })
      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 res.fail({
                status: HttpStatusCode.FORBIDDEN_403,
                message: 'Video is not publicly available'
              })
        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 res.fail({
                status: HttpStatusCode.FORBIDDEN_403,
                message: 'Playlist is not public'
              })
          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 res.fail({
                        status: HttpStatusCode.CONFLICT_409,
                        message: `Channel with name ${body.channel.name} already exists.`
                      })
            Severity: Major
            Found in server/core/middlewares/validators/users/user-registrations.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

                    return next()
                Severity: Major
                Found in server/core/middlewares/validators/users/users.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/users/users.ts - About 30 mins to fix

                    Avoid too many return statements within this function.
                    Open

                        if (!checkUserExportRight(userExport, res)) return
                    Severity: Major
                    Found in server/core/middlewares/validators/users/user-exports.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/users/user-import.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 next()
                          Severity: Major
                          Found in server/core/middlewares/validators/videos/video-source.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-chapters.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/users/users.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/users/user-exports.ts - About 30 mins to fix

                                  Avoid too many return statements within this function.
                                  Open

                                        return res.fail({
                                          message: 'An import is already being processed',
                                          status: HttpStatusCode.BAD_REQUEST_400
                                        })
                                  Severity: Major
                                  Found in server/core/middlewares/validators/users/user-import.ts - About 30 mins to fix

                                    Avoid too many return statements within this function.
                                    Open

                                        if (!checkInvalidVideoStudioConfig(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 fail()
                                      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/static.ts - About 30 mins to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language