Skip to content

Commit

Permalink
Use meta for Image struct instead of metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
dax committed Aug 27, 2023
1 parent e295c7f commit 820e104
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion images.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const (
type Image struct {
ID string `json:"id"`
Filename string `json:"filename"`
Metadata map[string]interface{} `json:"metadata,omitempty"`
Metadata map[string]interface{} `json:"meta,omitempty"`
RequireSignedURLs bool `json:"requireSignedURLs"`
Variants []string `json:"variants"`
Uploaded time.Time `json:"uploaded"`
Expand Down
10 changes: 5 additions & 5 deletions images_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ func TestUploadImage(t *testing.T) {
"result": {
"id": "ZxR0pLaXRldlBtaFhhO2FiZGVnaA",
"filename": "avatar.png",
"metadata": {
"meta": {
"meta": "metaID"
},
"requireSignedURLs": true,
Expand Down Expand Up @@ -121,7 +121,7 @@ func TestUploadImageByUrl(t *testing.T) {
"result": {
"id": "ZxR0pLaXRldlBtaFhhO2FiZGVnaA",
"filename": "avatar.png",
"metadata": {
"meta": {
"meta": "metaID"
},
"requireSignedURLs": true,
Expand Down Expand Up @@ -179,7 +179,7 @@ func TestUpdateImage(t *testing.T) {
"result": {
"id": "ZxR0pLaXRldlBtaFhhO2FiZGVnaA",
"filename": "avatar.png",
"metadata": {
"meta": {
"meta": "metaID"
},
"requireSignedURLs": true,
Expand Down Expand Up @@ -337,7 +337,7 @@ func TestListImages(t *testing.T) {
{
"id": "ZxR0pLaXRldlBtaFhhO2FiZGVnaA",
"filename": "avatar.png",
"metadata": {
"meta": {
"meta": "metaID"
},
"requireSignedURLs": true,
Expand Down Expand Up @@ -378,7 +378,7 @@ func TestImageDetails(t *testing.T) {
"result": {
"id": "ZxR0pLaXRldlBtaFhhO2FiZGVnaA",
"filename": "avatar.png",
"metadata": {
"meta": {
"meta": "metaID"
},
"requireSignedURLs": true,
Expand Down

0 comments on commit 820e104

Please sign in to comment.