✨ Able to edit thumbnail on update meta api
This commit is contained in:
parent
243dbfa9c2
commit
303f8a36f1
@ -91,6 +91,7 @@ func updateAttachmentMeta(c *fiber.Ctx) error {
|
|||||||
|
|
||||||
var data struct {
|
var data struct {
|
||||||
Alternative *string `json:"alt"`
|
Alternative *string `json:"alt"`
|
||||||
|
Thumbnail *string `json:"thumbnail"`
|
||||||
Metadata *map[string]any `json:"metadata"`
|
Metadata *map[string]any `json:"metadata"`
|
||||||
IsIndexable *bool `json:"is_indexable"`
|
IsIndexable *bool `json:"is_indexable"`
|
||||||
}
|
}
|
||||||
@ -107,6 +108,9 @@ func updateAttachmentMeta(c *fiber.Ctx) error {
|
|||||||
if data.Alternative != nil {
|
if data.Alternative != nil {
|
||||||
attachment.Alternative = *data.Alternative
|
attachment.Alternative = *data.Alternative
|
||||||
}
|
}
|
||||||
|
if data.Thumbnail != nil {
|
||||||
|
attachment.Thumbnail = *data.Thumbnail
|
||||||
|
}
|
||||||
if data.Metadata != nil {
|
if data.Metadata != nil {
|
||||||
attachment.Usermeta = *data.Metadata
|
attachment.Usermeta = *data.Metadata
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user