Commit 6579de0727b37535ecba3a8f6188f51a714e3a3e

Authored by Dmitriy Zaporozhets
2 parents 651a0dd5 cd8a90ee

Merge pull request #5799 from criteo/import_url_api

Add import_url param in API projects create
Showing 2 changed files with 3 additions and 1 deletions   Show diff stats
doc/api/projects.md
... ... @@ -239,6 +239,7 @@ Parameters:
239 239 + `snippets_enabled` (optional)
240 240 + `public` (optional) - if `true` same as setting visibility_level = 20
241 241 + `visibility_level` (optional)
  242 +* `import_url` (optional)
242 243  
243 244  
244 245 ### Create project for user
... ...
lib/api/projects.rb
... ... @@ -99,7 +99,8 @@ module API
99 99 :snippets_enabled,
100 100 :namespace_id,
101 101 :public,
102   - :visibility_level]
  102 + :visibility_level,
  103 + :import_url]
103 104 attrs = map_public_to_visibility_level(attrs)
104 105 @project = ::Projects::CreateContext.new(current_user, attrs).execute
105 106 if @project.saved?
... ...