discovery clear view
This commit is contained in:
parent
3ecb0e9d96
commit
5111c9c8be
@ -3,6 +3,7 @@ package tools
|
||||
import (
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"cloud.o-forge.io/core/oc-lib/config"
|
||||
@ -97,6 +98,7 @@ func (a *API) SubscribeRouter(infos []*beego.ControllerInfo) {
|
||||
nats := NewNATSCaller()
|
||||
discovery := map[string][]string{}
|
||||
for _, info := range infos {
|
||||
fmt.Println("DISCOVERY", info.GetPattern())
|
||||
path := strings.ReplaceAll(info.GetPattern(), "/oc/", "/"+strings.ReplaceAll(config.GetAppName(), "oc-", ""))
|
||||
for k, v := range info.GetMethod() {
|
||||
if discovery[path] == nil {
|
||||
|
Loading…
Reference in New Issue
Block a user