Merge branch 'master' into fixes/api, code clean up and tests fixed
Conflicts: doc/api/projects.md spec/requests/api/projects_spec.rb
This commit is contained in:
commit
3374027e3a
49 changed files with 820 additions and 163 deletions
|
@ -56,6 +56,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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue