Additional Admin APIs
This commit is contained in:
parent
d5663e148f
commit
61ffcab60f
6 changed files with 150 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue