summaryrefslogtreecommitdiff
path: root/lib/api/projects.rb
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-07-14 10:12:23 -0700
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-07-14 10:12:23 -0700
commit3c0596974a930b25ba96e9fe4f11ddd606d7473f (patch)
tree050bd3e3ac9c5d3a9f5827b08ea8d66ba55f60e0 /lib/api/projects.rb
parent17b5657331957df2f3eefc0108156f423bee5cb6 (diff)
parentace5c54ab91cdb9142a27d4543ee839684d29d5d (diff)
downloadgitlab-ce-3c0596974a930b25ba96e9fe4f11ddd606d7473f.tar.gz
Merge pull request #4538 from amacarthur/public-project-api2
enhance project creation apis to allow setting of public attribute
Diffstat (limited to 'lib/api/projects.rb')
-rw-r--r--lib/api/projects.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/api/projects.rb b/lib/api/projects.rb
index eb8a814be5d..1fdfff931a4 100644
--- a/lib/api/projects.rb
+++ b/lib/api/projects.rb
@@ -67,6 +67,7 @@ module API
# wiki_enabled (optional)
# snippets_enabled (optional)
# namespace_id (optional) - defaults to user namespace
+ # public (optional) - false by default
# Example Request
# POST /projects
post do
@@ -79,7 +80,8 @@ module API
:merge_requests_enabled,
:wiki_enabled,
:snippets_enabled,
- :namespace_id]
+ :namespace_id,
+ :public]
@project = ::Projects::CreateContext.new(current_user, attrs).execute
if @project.saved?
present @project, with: Entities::Project
@@ -103,6 +105,7 @@ module API
# merge_requests_enabled (optional)
# wiki_enabled (optional)
# snippets_enabled (optional)
+ # public (optional)
# Example Request
# POST /projects/user/:user_id
post "user/:user_id" do
@@ -115,7 +118,8 @@ module API
:wall_enabled,
:merge_requests_enabled,
:wiki_enabled,
- :snippets_enabled]
+ :snippets_enabled,
+ :public]
@project = ::Projects::CreateContext.new(user, attrs).execute
if @project.saved?
present @project, with: Entities::Project