Browse Source

case on repo url in get template handler

Alexander Belanger 4 năm trước cách đây
mục cha
commit
ebd760cf3a
1 tập tin đã thay đổi với 4 bổ sung0 xóa
  1. 4 0
      api/server/handlers/template/get.go

+ 4 - 0
api/server/handlers/template/get.go

@@ -45,6 +45,10 @@ func (t *TemplateGetHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
 		version = ""
 	}
 
+	if request.RepoURL == "" {
+		request.RepoURL = t.Config().ServerConf.DefaultApplicationHelmRepoURL
+	}
+
 	chart, err := loader.LoadChartPublic(request.RepoURL, name, version)
 
 	if err != nil {