From 820e104e6c73c6331e014702f667a7e49003d729 Mon Sep 17 00:00:00 2001 From: dax Date: Sun, 27 Aug 2023 01:02:25 -0400 Subject: [PATCH] Use meta for Image struct instead of metadata --- images.go | 2 +- images_test.go | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/images.go b/images.go index 12dea5dedb1..b1c53b7bf97 100644 --- a/images.go +++ b/images.go @@ -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"` diff --git a/images_test.go b/images_test.go index a8f089cd93f..dc6b7d37be2 100644 --- a/images_test.go +++ b/images_test.go @@ -63,7 +63,7 @@ func TestUploadImage(t *testing.T) { "result": { "id": "ZxR0pLaXRldlBtaFhhO2FiZGVnaA", "filename": "avatar.png", - "metadata": { + "meta": { "meta": "metaID" }, "requireSignedURLs": true, @@ -121,7 +121,7 @@ func TestUploadImageByUrl(t *testing.T) { "result": { "id": "ZxR0pLaXRldlBtaFhhO2FiZGVnaA", "filename": "avatar.png", - "metadata": { + "meta": { "meta": "metaID" }, "requireSignedURLs": true, @@ -179,7 +179,7 @@ func TestUpdateImage(t *testing.T) { "result": { "id": "ZxR0pLaXRldlBtaFhhO2FiZGVnaA", "filename": "avatar.png", - "metadata": { + "meta": { "meta": "metaID" }, "requireSignedURLs": true, @@ -337,7 +337,7 @@ func TestListImages(t *testing.T) { { "id": "ZxR0pLaXRldlBtaFhhO2FiZGVnaA", "filename": "avatar.png", - "metadata": { + "meta": { "meta": "metaID" }, "requireSignedURLs": true, @@ -378,7 +378,7 @@ func TestImageDetails(t *testing.T) { "result": { "id": "ZxR0pLaXRldlBtaFhhO2FiZGVnaA", "filename": "avatar.png", - "metadata": { + "meta": { "meta": "metaID" }, "requireSignedURLs": true,