Skip to content

Commit

Permalink
Merge pull request #318 from subutai-io/#298
Browse files Browse the repository at this point in the history
  • Loading branch information
emli authored Mar 19, 2018
2 parents 67f228d + 04a64bb commit f1b7a93
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion libgorjun/info_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
3 changes: 2 additions & 1 deletion template/template.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
Expand Down

0 comments on commit f1b7a93

Please sign in to comment.