diff options
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 |