diff options
author | Victor Morales <victor.morales@intel.com> | 2019-01-25 20:08:08 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2019-01-25 20:08:08 +0000 |
commit | 5c4e91705457dc4bdb5526e6f5210fa879ab659d (patch) | |
tree | 6fa26cf610af7e462a93d8ebf0e2f3c933ffac88 /src/k8splugin/api/defhandler.go | |
parent | 1adeeb1f5512c2d4c90158ce1f1963a99bbf9033 (diff) | |
parent | 5a509f45600d443c1ca087706d4609607cebe537 (diff) |
Merge "Add another parameter to the definition"
Diffstat (limited to 'src/k8splugin/api/defhandler.go')
-rw-r--r-- | src/k8splugin/api/defhandler.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/k8splugin/api/defhandler.go b/src/k8splugin/api/defhandler.go index 31b0f38f..f53acdd2 100644 --- a/src/k8splugin/api/defhandler.go +++ b/src/k8splugin/api/defhandler.go @@ -54,6 +54,12 @@ func (h rbDefinitionHandler) createHandler(w http.ResponseWriter, r *http.Reques return } + // Chart Name is required + if v.ChartName == "" { + http.Error(w, "Missing chart name in POST request", http.StatusBadRequest) + return + } + ret, err := h.client.Create(v) if err != nil { http.Error(w, err.Error(), http.StatusInternalServerError) |