diff --git a/controllers/admiralty.go b/controllers/admiralty.go index 3032fbf..1a1dd85 100644 --- a/controllers/admiralty.go +++ b/controllers/admiralty.go @@ -149,6 +149,8 @@ func (c *AdmiraltyController) CreateSource() { // TODO : Return a description of the created resource var respData map[string]interface{} err = json.Unmarshal(res,&respData) + + c.Ctx.Output.SetStatus(201) c.Data["json"] = respData c.ServeJSON() @@ -200,6 +202,7 @@ func (c *AdmiraltyController) CreateAdmiraltyTarget(){ c.Data["json"] = map[string]string{"error": err.Error()} return } + c.Ctx.Output.SetStatus(201) c.Data["json"] = data c.ServeJSON() @@ -258,7 +261,7 @@ func(c *AdmiraltyController) GetKubeSecret() { // @Param execution path string true "execution id of the workflow" // @Param kubeconfig body controllers.Kubeconfig true "Kubeconfig to use when creating secret" -// @Success 200 +// @Success 201 // @router /secret/:execution [post] func (c *AdmiraltyController) CreateKubeSecret() { var kubeconfig RemoteKubeconfig @@ -299,6 +302,7 @@ func (c *AdmiraltyController) CreateKubeSecret() { } err = json.Unmarshal(resp,&respData) + c.Ctx.Output.SetStatus(201) c.Data["json"] = respData c.ServeJSON()