diff --git a/libgorjun/info_test.go b/libgorjun/info_test.go index 118bd8b..d824e21 100644 --- a/libgorjun/info_test.go +++ b/libgorjun/info_test.go @@ -332,7 +332,7 @@ func TestListPriority(t *testing.T) { g.Register(g.Username) artifactType := "template" - v.Upload("data/debian-stretch-subutai-template_0.2.3_amd64.tar.gz", "template", "false") + v.Upload("data/postgres-subutai-template_4.0.0_amd64.tar.gz", "template", "false") err := g.Uploads(artifactType, "false") if err != nil { t.Errorf("Failed to uploads %s: %v", err, artifactType) diff --git a/template/template.go b/template/template.go index ed94cc2..3a96b90 100644 --- a/template/template.go +++ b/template/template.go @@ -318,6 +318,7 @@ func delTag(values map[string][]string) (int, error) { func ModifyConfig(w http.ResponseWriter, r *http.Request) { token := r.URL.Query().Get("token") + name := r.URL.Query().Get("name") owner := strings.ToLower(db.CheckToken(token)) if len(token) == 0 || len(owner) == 0 { w.WriteHeader(http.StatusUnauthorized) @@ -331,7 +332,7 @@ func ModifyConfig(w http.ResponseWriter, r *http.Request) { log.Warn(r.RemoteAddr + " - rejecting update request") return } - list := db.Search("") + list := db.Search(name) for _, k := range list { if db.CheckRepo("", "template", k) == 0 { continue