aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRitu Sood <ritu.sood@intel.com>2021-03-11 19:33:55 +0000
committerGerrit Code Review <gerrit@onap.org>2021-03-11 19:33:55 +0000
commit705fad712373e73463fff22a3136e6e92b372048 (patch)
tree25be42b9aa40ba17bee8116f2ff575c964eed6ac
parent4068b83937c490e638db0b8b0aceb8b7a88b7461 (diff)
parentdb4031f13d0de1333b98c13659f7f279bc690963 (diff)
Merge "Correct Day2 Config Template creation response"
-rw-r--r--src/k8splugin/api/configtemplatehandler.go9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/k8splugin/api/configtemplatehandler.go b/src/k8splugin/api/configtemplatehandler.go
index 641e4206..bd7c2db9 100644
--- a/src/k8splugin/api/configtemplatehandler.go
+++ b/src/k8splugin/api/configtemplatehandler.go
@@ -64,8 +64,13 @@ func (h rbTemplateHandler) createHandler(w http.ResponseWriter, r *http.Request)
return
}
- w.WriteHeader(http.StatusNoContent)
-
+ w.Header().Set("Content-Type", "application/json")
+ w.WriteHeader(http.StatusCreated)
+ err = json.NewEncoder(w).Encode(p)
+ if err != nil {
+ http.Error(w, err.Error(), http.StatusInternalServerError)
+ return
+ }
}
// uploadHandler handles upload of the template tar file into the database