From d2d1a5fb657493eb3b68e10a9a88a2e5d2acb8a0 Mon Sep 17 00:00:00 2001 From: Simone Gotti Date: Sun, 12 May 2019 23:23:30 +0200 Subject: [PATCH] gateway api: return project visibility --- internal/services/gateway/api/project.go | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/internal/services/gateway/api/project.go b/internal/services/gateway/api/project.go index 36efb84..215ee9a 100644 --- a/internal/services/gateway/api/project.go +++ b/internal/services/gateway/api/project.go @@ -240,11 +240,12 @@ func (h *ProjectHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { } type ProjectResponse 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 createProjectResponse(r *csapi.Project) *ProjectResponse { @@ -253,6 +254,7 @@ func createProjectResponse(r *csapi.Project) *ProjectResponse { Name: r.Name, Path: r.Path, ParentPath: r.ParentPath, + Visibility: r.Visibility, GlobalVisibility: string(r.GlobalVisibility), }