diff options
author | Rémy Coutable <remy@rymai.me> | 2017-01-05 18:10:24 +0000 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2017-01-05 18:10:24 +0000 |
commit | 3b8c81fe9edfa62f011716b94117df8dd44251cb (patch) | |
tree | 34d50da55844e6c0a85f799eb2fbfee2b3e6e78f /lib | |
parent | e0254708d51e27dbd93c4ce55a45ef855dc0a9c4 (diff) | |
parent | b5f4fc843ab37efc8010a52aedda16a224d971fd (diff) | |
download | gitlab-ce-3b8c81fe9edfa62f011716b94117df8dd44251cb.tar.gz |
Merge branch '19966-api-call-to-move-project-to-different-group-fails-when-using-group-and-project-names-instead-of-id' into 'master'
Fix groups API to accept path when transferring a project
Closes #19966
See merge request !8408
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 |