Commit 37a4ed79 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets
Browse files

Use new Projects::TransferService class


Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent 499d4f1d8e5d
......@@ -44,7 +44,7 @@
end
def transfer
::Projects::TransferService.new(project, current_user, params).execute
::Projects::TransferService.new(project, current_user, params[:project]).execute
end
def show
......
......@@ -87,5 +87,5 @@
# POST /groups/:id/projects/:project_id
post ":id/projects/:project_id" do
authenticated_as_admin!
@group = Group.find(params[:id])
group = Group.find(params[:id])
project = Project.find(params[:project_id])
......@@ -91,6 +91,8 @@
project = Project.find(params[:project_id])
if project.transfer(@group)
present @group
result = ::Projects::TransferService.new(project, current_user, namespace_id: group.id).execute
if result
present group
else
not_found!
end
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment