diff options
author | Dmitriy Zaporozhets <dzaporozhets@gitlab.com> | 2015-02-18 01:42:47 +0000 |
---|---|---|
committer | Dmitriy Zaporozhets <dzaporozhets@gitlab.com> | 2015-02-18 01:42:47 +0000 |
commit | fe2b98ab0bee618aa2af25f5fed53780997d9cd2 (patch) | |
tree | c7cc5763200526a9fa8fa34666c77b5167041092 /lib | |
parent | 000865f1387fed9cb88c20bb264442829a1b1dfc (diff) | |
parent | 24d939afb9816f3de2ca247de82f96ca32de3612 (diff) | |
download | gitlab-ce-fe2b98ab0bee618aa2af25f5fed53780997d9cd2.tar.gz |
Merge branch 'remove-group-id' into 'master'
Remove Group#owner_id from API
For #1943
See merge request !1537
Diffstat (limited to 'lib')
-rw-r--r-- | lib/api/entities.rb | 2 | ||||
-rw-r--r-- | lib/api/groups.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/api/entities.rb b/lib/api/entities.rb index 8d0664386b4..7572104fc16 100644 --- a/lib/api/entities.rb +++ b/lib/api/entities.rb @@ -65,7 +65,7 @@ module API end class Group < Grape::Entity - expose :id, :name, :path, :owner_id, :description + expose :id, :name, :path, :description end class GroupDetail < Group diff --git a/lib/api/groups.rb b/lib/api/groups.rb index 384a28e41f5..a92abd4b690 100644 --- a/lib/api/groups.rb +++ b/lib/api/groups.rb @@ -33,9 +33,9 @@ module API attrs = attributes_for_keys [:name, :path, :description] @group = Group.new(attrs) - @group.owner = current_user if @group.save + @group.add_owner(current_user) present @group, with: Entities::Group else render_api_error!("Failed to save group #{@group.errors.messages}", 400) |