diff options
author | Mark Fletcher <mark@gitlab.com> | 2017-01-02 18:19:47 +0000 |
---|---|---|
committer | Mark Fletcher <mark@gitlab.com> | 2017-01-03 09:25:56 +0000 |
commit | b5f4fc843ab37efc8010a52aedda16a224d971fd (patch) | |
tree | 9599ebd278ab217e42fe68905fb82f4822237715 /lib | |
parent | c2173a1464abe4048486ffe350ad65545ce239ce (diff) | |
download | gitlab-ce-b5f4fc843ab37efc8010a52aedda16a224d971fd.tar.gz |
Fix groups API to accept path when transferring a project
* Use standard helpers for finding group and project
Diffstat (limited to 'lib')
-rw-r--r-- | lib/api/groups.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/api/groups.rb b/lib/api/groups.rb index e04d2e40fb6..7682d286866 100644 --- a/lib/api/groups.rb +++ b/lib/api/groups.rb @@ -156,12 +156,12 @@ module API success Entities::GroupDetail end params do - requires :project_id, type: String, desc: 'The ID of the project' + requires :project_id, type: String, desc: 'The ID or path of the project' end post ":id/projects/:project_id" do authenticated_as_admin! - group = Group.find_by(id: params[:id]) - project = Project.find(params[:project_id]) + group = find_group!(params[:id]) + project = find_project!(params[:project_id]) result = ::Projects::TransferService.new(project, current_user).execute(group) if result |