Additional Admin APIs

This commit is contained in:
Angus MacArthur 2012-11-14 15:37:52 -05:00 committed by Angus MacArthur
parent d5663e148f
commit 61ffcab60f
6 changed files with 150 additions and 0 deletions

View file

@ -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