Bug on Format date

This commit is contained in:
mr
2024-08-21 16:38:29 +02:00
parent cf6143887e
commit 498ec3e9d8
2 changed files with 6 additions and 17 deletions

View File

@@ -64,13 +64,12 @@ func (p *PeerCache) GetAccessor(caller *tools.HTTPCaller) utils.Accessor {
func (p *PeerCache) LaunchPeerExecution(peerID string, isMySelf bool, dataID string, url string,
dt utils.DataType, method tools.METHOD, body map[string]interface{}, caller *tools.HTTPCaller) (*PeerExecution, error) {
fmt.Println("LaunchPeerExecution", url, strings.Contains(url, "localhost") || strings.Contains(url, "127.0.0.1"))
if strings.Contains(url, "localhost") || strings.Contains(url, "127.0.0.1") {
if isMySelf {
url = "http://" + dt.API() // default behavior on basic API container name
} else {
return nil, errors.New("Peer " + peerID + " is not reachable")
}
url = strings.ReplaceAll(url, "localhost", dt.API())
url = strings.ReplaceAll(url, "127.0.0.1", dt.API())
}
fmt.Println("LaunchPeerExecution AFT", url, dt.API())
var err error
b := []byte{}
methods := caller.URLS[dt.String()]