Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/api/helpers/internal_helpers.rb')
-rw-r--r--lib/api/helpers/internal_helpers.rb14
1 files changed, 6 insertions, 8 deletions
diff --git a/lib/api/helpers/internal_helpers.rb b/lib/api/helpers/internal_helpers.rb
index c8e96c7c5db..cc9d45dcae4 100644
--- a/lib/api/helpers/internal_helpers.rb
+++ b/lib/api/helpers/internal_helpers.rb
@@ -104,14 +104,12 @@ module API
# rubocop:disable Gitlab/ModuleWithInstanceVariables
def set_project
- if params[:gl_repository]
- @project, @repo_type = Gitlab::GlRepository.parse(params[:gl_repository])
- @redirected_path = nil
- elsif params[:project]
- @project, @repo_type, @redirected_path = Gitlab::RepoPath.parse(params[:project])
- else
- @project, @repo_type, @redirected_path = nil, nil, nil
- end
+ @project, @repo_type, @redirected_path =
+ if params[:gl_repository]
+ Gitlab::GlRepository.parse(params[:gl_repository])
+ elsif params[:project]
+ Gitlab::RepoPath.parse(params[:project])
+ end
end
# rubocop:enable Gitlab/ModuleWithInstanceVariables