From 56f81fb30efbbfc6aafa37cb5c884331746ad5ad Mon Sep 17 00:00:00 2001 From: mr Date: Thu, 17 Oct 2024 16:51:37 +0200 Subject: [PATCH] nats discovery --- tools/api.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/api.go b/tools/api.go index 7b8cebd..ee6e3ac 100644 --- a/tools/api.go +++ b/tools/api.go @@ -94,7 +94,7 @@ func (a *API) SubscribeRouter(infos []*beego.ControllerInfo) { for k := range info.GetMethod() { methods = append(methods, k) } - path := strings.ReplaceAll(info.GetPattern(), "/oc", "/"+strings.ReplaceAll(config.GetAppName(), "oc-", "")) + path := strings.ReplaceAll(info.GetPattern(), "/oc/", "/"+strings.ReplaceAll(config.GetAppName(), "oc-", "")) discovery[path] = methods } nats.SetNATSPub("api", DISCOVERY, discovery)