Skip to content

Commit 74af7c5

Browse files
authored
fix: state response structure (#11)
1 parent fe513fa commit 74af7c5

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

internal/service/api/handlers/get_signed_state.go

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,16 @@ func GetSignedState(w http.ResponseWriter, r *http.Request) {
5151
return
5252
}
5353

54-
ape.Render(w, resources.State{
55-
Key: resources.Key{
56-
ID: state.ID,
57-
Type: resources.STATE,
58-
},
59-
Attributes: resources.StateAttributes{
60-
Signature: hex.EncodeToString(signature),
61-
Timestamp: int64(state.Timestamp),
54+
ape.Render(w, resources.StateResponse{
55+
Data: resources.State{
56+
Key: resources.Key{
57+
ID: state.ID,
58+
Type: resources.STATE,
59+
},
60+
Attributes: resources.StateAttributes{
61+
Signature: hex.EncodeToString(signature),
62+
Timestamp: int64(state.Timestamp),
63+
},
6264
},
6365
})
6466
}

0 commit comments

Comments
 (0)