From 3a076bbf785dcd020aa2a5576aed7e8573da6451 Mon Sep 17 00:00:00 2001 From: ycc Date: Wed, 18 Oct 2023 11:08:10 +0200 Subject: [PATCH] conf fixes --- identity.json | 2 +- main.go | 1 + models/peer.go | 2 +- peers.json | 8 ++++---- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/identity.json b/identity.json index 70d99c9..6b1bd21 100644 --- a/identity.json +++ b/identity.json @@ -13,6 +13,6 @@ ], "last_seen_online": "2023-03-07T11:57:13.378707853+01:00", "api_version": "1", - "url": "https://irt.irtse.com/oc" + "api_url": "https://irt.irtse.com/oc" } } \ No newline at end of file diff --git a/main.go b/main.go index 63ff996..4e316b6 100644 --- a/main.go +++ b/main.go @@ -45,6 +45,7 @@ func main() { models.GetConfig().ZincUrl = o.GetStringDefault("zincurl", "http://localhost:4080") models.GetConfig().ZincLogin = o.GetStringDefault("zinclogin", "admin") models.GetConfig().ZincPassword = o.GetStringDefault("zincpassword", "admin") + models.GetConfig().IdentityFile = o.GetStringDefault("identityfile", "./identity.json") models.GetConfig().Defaultpeers = o.GetStringDefault("defaultpeers", "./peers.json") // Normal beego init diff --git a/models/peer.go b/models/peer.go index 6903fd9..be43bb4 100644 --- a/models/peer.go +++ b/models/peer.go @@ -28,7 +28,7 @@ type Peer struct { Email string `json:"email,omitempty"` Activity string `json:"activity,omitempty"` Keywords []string `json:"keywords,omitempty"` - ApiUrl string `json:"url,omitempty"` + ApiUrl string `json:"api_url,omitempty"` PublicKey string `json:"public_key,omitempty"` // internal use Score int64 `json:"score,omitempty"` diff --git a/peers.json b/peers.json index b8e295f..0fa5ca5 100644 --- a/peers.json +++ b/peers.json @@ -10,7 +10,7 @@ ], "last_seen_online": "2023-03-07T11:57:13.378707853+01:00", "api_version": "1", - "url": "https://asf.irtse.com/oc" + "api_url": "http://127.0.0.1:49618/v1" }, { "peer_id": "a50d3697-7ede-4fe5-a385-e9d01ebc1003", @@ -23,7 +23,7 @@ ], "last_seen_online": "2023-03-07T11:57:13.378707853+01:00", "api_version": "1", - "url": "https://it.irtse.com/oc" + "api_url": "https://it.irtse.com/oc" }, { "peer_id": "a50d3697-7ede-4fe5-a385-e9d01ebc1004", @@ -36,7 +36,7 @@ ], "last_seen_online": "2023-03-07T11:57:13.378707853+01:00", "api_version": "1", - "url": "https://impots.irtse.com/oc" + "api_url": "https://impots.irtse.com/oc" }, { "peer_id": "a50d3697-7ede-4fe5-a385-e9d01ebc1005", @@ -49,6 +49,6 @@ ], "last_seen_online": "2023-03-07T11:57:13.378707853+01:00", "api_version": "1", - "url": "https://douanes.irtse.com/oc" + "api_url": "https://douanes.irtse.com/oc" } ] \ No newline at end of file