From e6f3452314c73875bbf9560a84706161c25c2831 Mon Sep 17 00:00:00 2001 From: Tiago Botelho Date: Mon, 9 Jul 2018 13:24:29 +0100 Subject: Adds with_projects optional parameter to /groups/:id API endpoint --- lib/api/groups.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/api/groups.rb') 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 } -- cgit v1.2.1