From 186ba3e689c7f5d7e560f41a2f869b085357139e Mon Sep 17 00:00:00 2001 From: mr Date: Thu, 29 Jan 2026 13:20:33 +0100 Subject: [PATCH] address --- models/peer/peer.go | 7 +++---- models/peer/tests/peer_test.go | 3 ++- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/models/peer/peer.go b/models/peer/peer.go index 654b2f9..54c3387 100644 --- a/models/peer/peer.go +++ b/models/peer/peer.go @@ -64,10 +64,9 @@ type Peer struct { Verify bool `json:"verify" bson:"verify"` PeerID string `json:"peer_id" bson:"peer_id" validate:"required"` - StreamHost string `json:"stream_host" bson:"stream_host" validate:"required"` // Url is the URL of the peer (base64url) - APIUrl string `json:"api_url" bson:"api_url" validate:"required"` // Url is the URL of the peer (base64url) - - NATSUrl string `json:"nats_url" bson:"nats_url" validate:"required"` + APIUrl string `json:"api_url" bson:"api_url" validate:"required"` // Url is the URL of the peer (base64url) + StreamAddress string `json:"stream_address" bson:"stream_address" validate:"required"` // Url is the URL of the peer (base64url) + NATSAddress string `json:"nats_address" bson:"nats_address" validate:"required"` WalletAddress string `json:"wallet_address" bson:"wallet_address" validate:"required"` // WalletAddress is the wallet address of the peer PublicKey string `json:"public_key" bson:"public_key" validate:"required"` // PublicKey is the public key of the peer State PeerState `json:"state" bson:"state" default:"0"` diff --git a/models/peer/tests/peer_test.go b/models/peer/tests/peer_test.go index 47eca22..38807fd 100644 --- a/models/peer/tests/peer_test.go +++ b/models/peer/tests/peer_test.go @@ -48,7 +48,8 @@ func (m *MockAccessor) Search(filters *dbs.Filters, search string, isDraft bool) func newTestPeer() *peer.Peer { return &peer.Peer{ - StreamHost: "127.0.0.1", + NATSAddress: "", + StreamAddress: "127.0.0.1", APIUrl: "http://localhost", WalletAddress: "0x123", PublicKey: "pubkey",