diff options
author | Tiago Botelho <tiagonbotelho@hotmail.com> | 2018-07-09 15:24:29 +0300 |
---|---|---|
committer | Tiago Botelho <tiagonbotelho@hotmail.com> | 2018-07-09 18:28:17 +0300 |
commit | e6f3452314c73875bbf9560a84706161c25c2831 (patch) | |
tree | d949113ed99dd0ef46a2fbf887fb5d07c0405d93 /lib/api/groups.rb | |
parent | 21a511e47e448250802b1777b43589c9168e0638 (diff) |
Adds with_projects optional parameter to /groups/:id API endpoint
Diffstat (limited to 'lib/api/groups.rb')
-rw-r--r-- | lib/api/groups.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/api/groups.rb b/lib/api/groups.rb index f633dd88d06..797b04df059 100644 --- a/lib/api/groups.rb +++ b/lib/api/groups.rb @@ -150,12 +150,13 @@ module API end params do use :with_custom_attributes + optional :with_projects, type: Boolean, default: true, desc: 'Omit project details' end get ":id" do group = find_group!(params[:id]) options = { - with: Entities::GroupDetail, + with: params[:with_projects] ? Entities::GroupDetail : Entities::Group, current_user: current_user } |