func SystemReleaseList(rw http.ResponseWriter, r *http.Request) *httperr.Error { rack, err := provider.SystemGet() if awsError(err) == "ValidationError" { return httperr.Errorf(404, "no such stack: %s", rack) } if err != nil { return httperr.Server(err) } releases, err := models.ListReleases(rack.Name) if err != nil { return httperr.Server(err) } return RenderJson(rw, releases) }
func ReleaseList(rw http.ResponseWriter, r *http.Request) *httperr.Error { vars := mux.Vars(r) app := vars["app"] _, err := models.GetApp(app) if awsError(err) == "ValidationError" { return httperr.Errorf(404, "no such app: %s", app) } if err != nil { return httperr.Server(err) } releases, err := models.ListReleases(app) if err != nil { return httperr.Server(err) } return RenderJson(rw, releases) }
func ReleaseList(rw http.ResponseWriter, r *http.Request) error { vars := mux.Vars(r) app := vars["app"] _, err := models.GetApp(app) if awsError(err) == "ValidationError" { return RenderNotFound(rw, fmt.Sprintf("no such app: %s", app)) } if err != nil { return err } releases, err := models.ListReleases(app) if err != nil { return err } return RenderJson(rw, releases) }