fix: need to update FileReference struct so that URI and Key are omitted if empty

This commit is contained in:
Derrick Hammer 2024-01-18 10:02:30 -05:00
parent 113f24f4d8
commit 4e78403658
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 2 additions and 2 deletions

View File

@ -32,8 +32,8 @@ type FileReference struct {
Ext ExtMap `json:"ext"` Ext ExtMap `json:"ext"`
History FileHistoryMap `json:"history"` History FileHistoryMap `json:"history"`
MimeType string `json:"mimeType"` MimeType string `json:"mimeType"`
URI string `json:"uri"` URI string `json:"uri,omitempty"`
Key string `json:"key"` Key string `json:"key,omitempty"`
} }
func NewFileReference(name string, created, version uint64, file *FileVersion, ext ExtMap, history FileHistoryMap, mimeType string) *FileReference { func NewFileReference(name string, created, version uint64, file *FileVersion, ext ExtMap, history FileHistoryMap, mimeType string) *FileReference {