diff --git a/pkg/mapper/mapper.go b/pkg/mapper/mapper.go index 0a701dc..9ec80d7 100644 --- a/pkg/mapper/mapper.go +++ b/pkg/mapper/mapper.go @@ -221,15 +221,15 @@ func (h *Handler) populateContentRelatedFields(model *schema.IndexModel, enriche log := h.log.WithTransactionID(tid).WithUUID(enrichedContent.UUID) - if len(enrichedContent.InternalContent.MainImage.Members) == 0 || enrichedContent.InternalContent.MainImage.Members[0].ID == "" { - log.Warnf("Main image is not present or with empty ID.") + if len(enrichedContent.InternalContent.MainImage.Members) == 0 || enrichedContent.InternalContent.MainImage.Members[0].APIURL == "" { + log.Warnf("Main image is not present or with empty apiUrl.") } else { - uris := strings.Split(enrichedContent.InternalContent.MainImage.Members[0].ID, "/") + uris := strings.Split(enrichedContent.InternalContent.MainImage.Members[0].APIURL, "/") if len(uris) > 0 { imageUUID := uris[len(uris)-1] *model.ThumbnailURL = strings.Replace(imageServiceURL, imagePlaceholder, imageUUID, -1) } else { - log.Warnf("Couldn't get image UUID from ID %q", enrichedContent.InternalContent.MainImage.Members[0].ID) + log.Warnf("Couldn't get image UUID from apiUrl %q", enrichedContent.InternalContent.MainImage.Members[0].APIURL) } } } diff --git a/pkg/schema/schema.go b/pkg/schema/schema.go index 8f321ee..fb02421 100644 --- a/pkg/schema/schema.go +++ b/pkg/schema/schema.go @@ -161,17 +161,5 @@ type ImageSet struct { } type Member struct { - ID string `json:"id"` - Type string `json:"type"` - Title string `json:"title"` - BinaryURL string `json:"binaryUrl"` - Description string `json:"description"` - CanBeSyndicated string `json:"canBeSyndicated"` - CanBeDistributed string `json:"canBeDistributed"` - RightsGroup string `json:"rightsGroup"` - Copyright struct { - Notice string `json:"notice"` - } `json:"copyright"` - MaxDisplayWidth string `json:"maxDisplayWidth"` - MinDisplayWidth string `json:"minDisplayWidth"` + APIURL string `json:"apiUrl"` }