17119: merge SharedGroupList into GroupList, which now gets an
[arvados.git] / lib / controller / router / response.go
index 2a7bd9e6745ba9eecda72498e7463e77c17cd887..309ed48f64516be4211b0cd90950f09955fb5aa2 100644 (file)
@@ -71,11 +71,13 @@ func (rtr *router) sendResponse(w http.ResponseWriter, req *http.Request, resp i
        }
 
        respKind := kind(resp)
-       if respKind == "arvados#sharedGroupList" {
-               tmp["kind"] = "arvados#groupList"
-       } else if respKind != "" {
+       if respKind != "" {
                tmp["kind"] = respKind
        }
+       if included, ok := tmp["included"]; ok && included == nil {
+               tmp["included"] = make([]interface{}, 0)
+       }
+
        defaultItemKind := ""
        if strings.HasSuffix(respKind, "List") {
                defaultItemKind = strings.TrimSuffix(respKind, "List")