Skip to content
Snippets Groups Projects
Unverified Commit bfdb8af5 authored by Levente Pap's avatar Levente Pap
Browse files

WebAPI handles strong/weak parents

parent 987c6802
No related branches found
No related tags found
No related merge requests found
...@@ -46,10 +46,9 @@ func findByIDHandler(c echo.Context) error { ...@@ -46,10 +46,9 @@ func findByIDHandler(c echo.Context) error {
Solid: msgMetadata.IsSolid(), Solid: msgMetadata.IsSolid(),
SolidificationTime: msgMetadata.SolidificationTime().Unix(), SolidificationTime: msgMetadata.SolidificationTime().Unix(),
}, },
ID: msg.ID().String(), ID: msg.ID().String(),
//TODO: adjust StrongParents: msg.StrongParents().ToStrings(),
//Parent1ID: msg.Parent1ID().String(), WeakParents: msg.WeakParents().ToStrings(),
//Parent2ID: msg.Parent2ID().String(),
IssuerPublicKey: msg.IssuerPublicKey().String(), IssuerPublicKey: msg.IssuerPublicKey().String(),
IssuingTime: msg.IssuingTime().Unix(), IssuingTime: msg.IssuingTime().Unix(),
SequenceNumber: msg.SequenceNumber(), SequenceNumber: msg.SequenceNumber(),
...@@ -79,14 +78,14 @@ type FindByIDRequest struct { ...@@ -79,14 +78,14 @@ type FindByIDRequest struct {
// Message contains information about a given message. // Message contains information about a given message.
type Message struct { type Message struct {
Metadata `json:"metadata,omitempty"` Metadata `json:"metadata,omitempty"`
ID string `json:"ID,omitempty"` ID string `json:"ID,omitempty"`
Parent1ID string `json:"parent1Id,omitempty"` StrongParents []string `json:"strongParents,omitempty"`
Parent2ID string `json:"parent2Id,omitempty"` WeakParents []string `json:"weakParents,omitempty"`
IssuerPublicKey string `json:"issuerPublicKey,omitempty"` IssuerPublicKey string `json:"issuerPublicKey,omitempty"`
IssuingTime int64 `json:"issuingTime,omitempty"` IssuingTime int64 `json:"issuingTime,omitempty"`
SequenceNumber uint64 `json:"sequenceNumber,omitempty"` SequenceNumber uint64 `json:"sequenceNumber,omitempty"`
Payload []byte `json:"payload,omitempty"` Payload []byte `json:"payload,omitempty"`
Signature string `json:"signature,omitempty"` Signature string `json:"signature,omitempty"`
} }
// Metadata contains metadata information of a message. // Metadata contains metadata information of a message.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment