Browse Source

Updated handler to get the value for namespace from url

jnfrati 5 years ago
parent
commit
5aea321009
1 changed files with 2 additions and 5 deletions
  1. 2 5
      server/api/k8s_handler.go

+ 2 - 5
server/api/k8s_handler.go

@@ -172,11 +172,8 @@ func (app *App) HandleDeleteNamespace(w http.ResponseWriter, r *http.Request) {
 		return
 	}
 
-	namespace := &forms.NamespaceForm{}
-
-	if err := json.NewDecoder(r.Body).Decode(namespace); err != nil {
-		app.handleErrorFormDecoding(err, ErrUserDecode, w)
-		return
+	namespace := &forms.NamespaceForm{
+		Name: vals.Get("name"),
 	}
 
 	err = agent.DeleteNamespace(namespace.Name)