more fixes

This commit is contained in:
2026-01-25 22:30:01 +01:00
parent b548955ed9
commit 27960741a3
5 changed files with 102 additions and 45 deletions
+1 -1
View File
@@ -157,7 +157,7 @@ func (c *PlayController) ServeContent(w http.ResponseWriter, r *http.Request) {
return
}
htmlBaseDir := filepath.Join(contentsPath, name, fmt.Sprintf("%s-%s-html", name, version))
htmlBaseDir := filepath.Join(contentsPath, name, version, "html")
if _, err := os.Stat(htmlBaseDir); os.IsNotExist(err) {
http.Error(w, fmt.Sprintf("Content for '%s' not found.", name), http.StatusNotFound)
+7 -1
View File
@@ -24,8 +24,14 @@ func (c *SoftwareUpdaterController) update(w http.ResponseWriter, r *http.Reques
platform := r.URL.Query().Get("platform")
name := r.URL.Query().Get("name")
version := r.URL.Query().Get("version")
if err := c.service.Update(platform, name); err != nil {
if version == "" {
http.Error(w, "Version not provided", http.StatusBadRequest)
return
}
if err := c.service.Update(platform, name, version); err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)
return
}