This commit is contained in:
mr 2024-10-22 14:27:52 +02:00
parent 719fa239e0
commit 55a25aba83

View File

@ -91,9 +91,13 @@ func (a *API) SubscribeRouter(infos []*beego.ControllerInfo) {
discovery := map[string]interface{}{}
for _, info := range infos {
methods := []string{}
for k := range info.GetMethod() {
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
}