summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJames Lopez <james@jameslopez.es>2018-02-12 15:26:59 +0100
committerJames Lopez <james@jameslopez.es>2018-02-13 15:25:48 +0100
commit516d33f5ac8f65d8d69d1e5e88efbf0faabbe0eb (patch)
treeeca0fac8e5ddb91236b3e0f27343c6e4371a2608 /lib
parentd3b3f5d1b4def5e87f90a2347acc0b0ee8edc80a (diff)
downloadgitlab-ce-516d33f5ac8f65d8d69d1e5e88efbf0faabbe0eb.tar.gz
update import API and spec
Diffstat (limited to 'lib')
-rw-r--r--lib/api/project_import.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/api/project_import.rb b/lib/api/project_import.rb
index 396c316af22..1b63f4d4d9f 100644
--- a/lib/api/project_import.rb
+++ b/lib/api/project_import.rb
@@ -17,7 +17,7 @@ module API
end
params do
- requires :name, type: String, desc: 'The new project name'
+ requires :path, type: String, desc: 'The new project path and name'
optional :namespace, type: String, desc: 'The ID or name of the namespace that the project will be imported into. Defaults to the user namespace.'
requires :file, type: File, desc: 'The project export file to be imported'
end
@@ -38,7 +38,7 @@ module API
Namespace.find_by_path_or_name(namespace)
end
- project_params = import_params.merge(namespace: namespace.id)
+ project_params = import_params.merge(namespace_id: namespace.id)
project = ::Projects::GitlabProjectsImportService.new(current_user, project_params).execute