method
This commit is contained in:
parent
719fa239e0
commit
55a25aba83
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user