appmanager: refactor schema into interface, introduce cuelang
diff --git a/core/installer/welcome/appmanager.go b/core/installer/welcome/appmanager.go
index be077e0..5d7e537 100644
--- a/core/installer/welcome/appmanager.go
+++ b/core/installer/welcome/appmanager.go
@@ -71,7 +71,6 @@
Icon template.HTML `json:"icon"`
ShortDescription string `json:"shortDescription"`
Slug string `json:"slug"`
- Schema string `json:"schema"`
Instances []installer.AppConfig `json:"instances,omitempty"`
}
@@ -82,7 +81,7 @@
}
resp := make([]app, len(all))
for i, a := range all {
- resp[i] = app{a.Name, a.Icon, a.ShortDescription, a.Name, a.Schema, nil}
+ resp[i] = app{a.Name, a.Icon, a.ShortDescription, a.Name, nil}
}
return c.JSON(http.StatusOK, resp)
}
@@ -116,7 +115,7 @@
}
}
}
- return c.JSON(http.StatusOK, app{a.Name, a.Icon, a.ShortDescription, a.Name, a.Schema, instances})
+ return c.JSON(http.StatusOK, app{a.Name, a.Icon, a.ShortDescription, a.Name, instances})
}
func (s *AppManagerServer) handleInstance(c echo.Context) error {
@@ -146,7 +145,7 @@
if err != nil {
return err
}
- return c.JSON(http.StatusOK, app{a.Name, a.Icon, a.ShortDescription, a.Name, a.Schema, []installer.AppConfig{instance}})
+ return c.JSON(http.StatusOK, app{a.Name, a.Icon, a.ShortDescription, a.Name, []installer.AppConfig{instance}})
}
type file struct {
@@ -293,7 +292,7 @@
}
resp := make([]app, len(all))
for i, a := range all {
- resp[i] = app{a.Name, a.Icon, a.ShortDescription, a.Name, a.Schema, nil}
+ resp[i] = app{a.Name, a.Icon, a.ShortDescription, a.Name, nil}
}
return tmpl.Execute(c.Response(), resp)
}