gateway api: return project visibility
This commit is contained in:
parent
83f6ebe95f
commit
d2d1a5fb65
|
@ -240,11 +240,12 @@ func (h *ProjectHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||||
}
|
}
|
||||||
|
|
||||||
type ProjectResponse struct {
|
type ProjectResponse struct {
|
||||||
ID string `json:"id,omitempty"`
|
ID string `json:"id,omitempty"`
|
||||||
Name string `json:"name,omitempty"`
|
Name string `json:"name,omitempty"`
|
||||||
Path string `json:"path,omitempty"`
|
Path string `json:"path,omitempty"`
|
||||||
ParentPath string `json:"parent_path,omitempty"`
|
ParentPath string `json:"parent_path,omitempty"`
|
||||||
GlobalVisibility string `json:"global_visibility,omitempty"`
|
Visibility types.Visibility `json:"visibility,omitempty"`
|
||||||
|
GlobalVisibility string `json:"global_visibility,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func createProjectResponse(r *csapi.Project) *ProjectResponse {
|
func createProjectResponse(r *csapi.Project) *ProjectResponse {
|
||||||
|
@ -253,6 +254,7 @@ func createProjectResponse(r *csapi.Project) *ProjectResponse {
|
||||||
Name: r.Name,
|
Name: r.Name,
|
||||||
Path: r.Path,
|
Path: r.Path,
|
||||||
ParentPath: r.ParentPath,
|
ParentPath: r.ParentPath,
|
||||||
|
Visibility: r.Visibility,
|
||||||
GlobalVisibility: string(r.GlobalVisibility),
|
GlobalVisibility: string(r.GlobalVisibility),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue