diff options
author | Angus MacArthur <amacarthur@rim.com> | 2012-11-14 15:37:52 -0500 |
---|---|---|
committer | Angus MacArthur <amacarthur@blackberry.com> | 2013-03-05 10:38:43 -0500 |
commit | 61ffcab60fef2efcd54b8496aa09de79ee999a2c (patch) | |
tree | 7a493e25800421cdb94607b52836d50274d5c0f7 /lib/api/groups.rb | |
parent | d5663e148fdf8d1c767479e62c86c7a2b4db654e (diff) | |
download | gitlab-ce-61ffcab60fef2efcd54b8496aa09de79ee999a2c.tar.gz |
Additional Admin APIs
Diffstat (limited to 'lib/api/groups.rb')
-rw-r--r-- | lib/api/groups.rb | 18 |
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 |