Working
This commit is contained in:
@@ -7,6 +7,10 @@ import (
|
|||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
type SnapshotListResponse struct {
|
||||||
|
Snapshots []*SnapshotRecord `json:"snapshots"`
|
||||||
|
}
|
||||||
|
|
||||||
type SnapshotRecord struct {
|
type SnapshotRecord struct {
|
||||||
Id int `json:"id"`
|
Id int `json:"id"`
|
||||||
SnapshotSubmission
|
SnapshotSubmission
|
||||||
@@ -37,7 +41,7 @@ func createSnapshotSubFromJsonBodyStream(jsonBodyStream io.ReadCloser) (*Snapsho
|
|||||||
}
|
}
|
||||||
|
|
||||||
func createJsonFromSnapshotRecords(records []*SnapshotRecord) ([]byte, error) {
|
func createJsonFromSnapshotRecords(records []*SnapshotRecord) ([]byte, error) {
|
||||||
jsonResult, err := json.Marshal(records)
|
jsonResult, err := json.Marshal(SnapshotListResponse{records})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user