diff options
author | James Lopez <james@jameslopez.es> | 2018-02-16 18:03:34 +0100 |
---|---|---|
committer | James Lopez <james@jameslopez.es> | 2018-02-16 18:03:34 +0100 |
commit | d8dfec0ffa4fdbb383bf4f0d1ef71969adb50dd3 (patch) | |
tree | 24702d032096a9e772c769630bdb77f3ab221b70 /lib/api/project_import.rb | |
parent | 46d59a5d24c0cdbfab42587426dba3ab7b85be03 (diff) | |
download | gitlab-ce-d8dfec0ffa4fdbb383bf4f0d1ef71969adb50dd3.tar.gz |
Fix project import API after import service refactor
Diffstat (limited to 'lib/api/project_import.rb')
-rw-r--r-- | lib/api/project_import.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/api/project_import.rb b/lib/api/project_import.rb index c32e2f26ae3..a509c1f32c1 100644 --- a/lib/api/project_import.rb +++ b/lib/api/project_import.rb @@ -41,8 +41,12 @@ module API current_user.namespace end - project_params = import_params.merge(namespace_id: namespace.id, - file: import_params[:file]['tempfile']) + project_params = { + path: import_params[:path], + namespace_id: namespace.id, + file: import_params[:file]['tempfile'] + } + project = ::Projects::GitlabProjectsImportService.new(current_user, project_params).execute render_api_error!(project.errors.full_messages&.first, 400) unless project.saved? |