summaryrefslogtreecommitdiff
path: root/lib/api/groups.rb
diff options
context:
space:
mode:
authorAngus MacArthur <amacarthur@rim.com>2012-11-14 15:37:52 -0500
committerAngus MacArthur <amacarthur@blackberry.com>2013-03-05 10:38:43 -0500
commit61ffcab60fef2efcd54b8496aa09de79ee999a2c (patch)
tree7a493e25800421cdb94607b52836d50274d5c0f7 /lib/api/groups.rb
parentd5663e148fdf8d1c767479e62c86c7a2b4db654e (diff)
downloadgitlab-ce-61ffcab60fef2efcd54b8496aa09de79ee999a2c.tar.gz
Additional Admin APIs
Diffstat (limited to 'lib/api/groups.rb')
-rw-r--r--lib/api/groups.rb18
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/api/groups.rb b/lib/api/groups.rb
index a67caef0bc5..464a2d15662 100644
--- a/lib/api/groups.rb
+++ b/lib/api/groups.rb
@@ -51,6 +51,24 @@ module Gitlab
not_found!
end
end
+
+ # Transfer a project to the Group namespace
+ #
+ # Parameters:
+ # id - group id
+ # project_id - project id
+ # Example Request:
+ # POST /groups/:id/projects/:project_id
+ post ":id/projects/:project_id" do
+ authenticated_as_admin!
+ @group = Group.find(params[:id])
+ project = Project.find(params[:project_id])
+ if project.transfer(@group)
+ present @group
+ else
+ not_found!
+ end
+ end
end
end
end