From 5dfe7f8ce9709fd919012f7d4e313b698e1b28c9 Mon Sep 17 00:00:00 2001 From: Simone Gotti Date: Sun, 12 May 2019 23:24:48 +0200 Subject: [PATCH] gateway api: return projectgroup visibility --- internal/services/gateway/api/projectgroup.go | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/internal/services/gateway/api/projectgroup.go b/internal/services/gateway/api/projectgroup.go index e3100a1..94d7b2a 100644 --- a/internal/services/gateway/api/projectgroup.go +++ b/internal/services/gateway/api/projectgroup.go @@ -180,11 +180,12 @@ func (h *ProjectGroupSubgroupsHandler) ServeHTTP(w http.ResponseWriter, r *http. } type ProjectGroupResponse struct { - ID string `json:"id,omitempty"` - Name string `json:"name,omitempty"` - Path string `json:"path,omitempty"` - ParentPath string `json:"parent_path,omitempty"` - GlobalVisibility string `json:"global_visibility,omitempty"` + ID string `json:"id,omitempty"` + Name string `json:"name,omitempty"` + Path string `json:"path,omitempty"` + ParentPath string `json:"parent_path,omitempty"` + Visibility types.Visibility `json:"visibility,omitempty"` + GlobalVisibility string `json:"global_visibility,omitempty"` } func createProjectGroupResponse(r *csapi.ProjectGroup) *ProjectGroupResponse { @@ -193,6 +194,7 @@ func createProjectGroupResponse(r *csapi.ProjectGroup) *ProjectGroupResponse { Name: r.Name, Path: r.Path, ParentPath: r.ParentPath, + Visibility: r.Visibility, GlobalVisibility: string(r.GlobalVisibility), }