more fixes
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user