gateway api: return projectgroup visibility

This commit is contained in:
Simone Gotti 2019-05-12 23:24:48 +02:00
parent d2d1a5fb65
commit 5dfe7f8ce9
1 changed files with 7 additions and 5 deletions

View File

@ -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),
}