From 3fce8485bb03fdd46df69c70fb8541979a25d096 Mon Sep 17 00:00:00 2001 From: Bethuel Mmbaga Date: Sat, 11 Jan 2025 22:09:29 +0300 Subject: [PATCH] Enabled new network resource and router by default (#3174) Signed-off-by: bcmmbaga --- management/server/http/handlers/networks/resources_handler.go | 1 + management/server/http/handlers/networks/routers_handler.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/management/server/http/handlers/networks/resources_handler.go b/management/server/http/handlers/networks/resources_handler.go index a0dc9a10d..6499bd652 100644 --- a/management/server/http/handlers/networks/resources_handler.go +++ b/management/server/http/handlers/networks/resources_handler.go @@ -123,6 +123,7 @@ func (h *resourceHandler) createResource(w http.ResponseWriter, r *http.Request) resource.NetworkID = mux.Vars(r)["networkId"] resource.AccountID = accountID + resource.Enabled = true resource, err = h.resourceManager.CreateResource(r.Context(), userID, resource) if err != nil { util.WriteError(r.Context(), err, w) diff --git a/management/server/http/handlers/networks/routers_handler.go b/management/server/http/handlers/networks/routers_handler.go index 2cf39a132..7ca95d902 100644 --- a/management/server/http/handlers/networks/routers_handler.go +++ b/management/server/http/handlers/networks/routers_handler.go @@ -85,7 +85,7 @@ func (h *routersHandler) createRouter(w http.ResponseWriter, r *http.Request) { router.NetworkID = networkID router.AccountID = accountID - + router.Enabled = true router, err = h.routersManager.CreateRouter(r.Context(), userID, router) if err != nil { util.WriteError(r.Context(), err, w)