From 55a25aba835b266836391d7eb71bd170b35a798a Mon Sep 17 00:00:00 2001 From: mr Date: Tue, 22 Oct 2024 14:27:52 +0200 Subject: [PATCH] method --- tools/api.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tools/api.go b/tools/api.go index ee6e3ac..f697b1d 100644 --- a/tools/api.go +++ b/tools/api.go @@ -91,8 +91,12 @@ func (a *API) SubscribeRouter(infos []*beego.ControllerInfo) { discovery := map[string]interface{}{} for _, info := range infos { methods := []string{} - for k := range info.GetMethod() { - methods = append(methods, k) + for k, v := range info.GetMethod() { + if strings.Contains(strings.ToLower(v), "internal") { + methods = append(methods, "INTERNAL"+k) + } else { + methods = append(methods, k) + } } path := strings.ReplaceAll(info.GetPattern(), "/oc/", "/"+strings.ReplaceAll(config.GetAppName(), "oc-", "")) discovery[path] = methods