Fix counter int to string heartbeats endpoint (#70)

This commit is contained in:
walker-16 2023-01-20 13:38:40 -03:00 committed by GitHub
parent 9c069aabc3
commit cf274f1fd8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -36,7 +36,7 @@ type HeartbeatResponse struct {
type RawHeartbeat struct {
NodeName string `json:"nodeName"`
Counter int64 `json:"counter"`
Counter string `json:"counter"`
Timestamp string `json:"timestamp"`
Networks []*HeartbeatNetworkResponse `json:"networks"`
Version string `json:"version"`
@ -105,7 +105,7 @@ func buildHeartbeatResponse(heartbeats []*HeartbeatDoc) *HeartbeatsResponse {
P2PNodeAddr: "", // not exists in heartbeats mongo collection.
RawHeartbeat: &RawHeartbeat{
NodeName: heartbeat.NodeName,
Counter: heartbeat.Counter,
Counter: strconv.Itoa(int(heartbeat.Counter)),
Timestamp: strconv.Itoa(int(heartbeat.Timestamp)),
Networks: networkResponses,
Version: heartbeat.Version,