Skip to content

Commit

Permalink
fix: state response structure
Browse files Browse the repository at this point in the history
  • Loading branch information
mhrynenko committed Dec 6, 2024
1 parent fe513fa commit d3c230f
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions internal/service/api/handlers/get_signed_state.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,16 @@ func GetSignedState(w http.ResponseWriter, r *http.Request) {
return
}

ape.Render(w, resources.State{
Key: resources.Key{
ID: state.ID,
Type: resources.STATE,
},
Attributes: resources.StateAttributes{
Signature: hex.EncodeToString(signature),
Timestamp: int64(state.Timestamp),
ape.Render(w, resources.StateResponse{
Data: resources.State{
Key: resources.Key{
ID: state.ID,
Type: resources.STATE,
},
Attributes: resources.StateAttributes{
Signature: hex.EncodeToString(signature),
Timestamp: int64(state.Timestamp),
},
},
})
}
Expand Down

0 comments on commit d3c230f

Please sign in to comment.