method
This commit is contained in:
parent
719fa239e0
commit
55a25aba83
@ -91,8 +91,12 @@ func (a *API) SubscribeRouter(infos []*beego.ControllerInfo) {
|
|||||||
discovery := map[string]interface{}{}
|
discovery := map[string]interface{}{}
|
||||||
for _, info := range infos {
|
for _, info := range infos {
|
||||||
methods := []string{}
|
methods := []string{}
|
||||||
for k := range info.GetMethod() {
|
for k, v := range info.GetMethod() {
|
||||||
methods = append(methods, k)
|
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-", ""))
|
path := strings.ReplaceAll(info.GetPattern(), "/oc/", "/"+strings.ReplaceAll(config.GetAppName(), "oc-", ""))
|
||||||
discovery[path] = methods
|
discovery[path] = methods
|
||||||
|
Loading…
Reference in New Issue
Block a user