New dynamic URL match

This commit is contained in:
mr
2026-02-12 13:20:06 +01:00
parent 1895b7ac8a
commit 7e8546bbea
4 changed files with 79 additions and 21 deletions

View File

@@ -41,6 +41,7 @@ func CheckPeerStatus(peerID string, appName string) (*Peer, bool) {
return nil, false
}
url := urlFormat(res.(*Peer).APIUrl, tools.PEER) + "/status" // Format the URL
fmt.Println(url)
state, services := api.CheckRemotePeer(url)
res.(*Peer).ServicesState = services // Update the services states of the peer
access.UpdateOne(res, peerID) // Update the peer in the db