mirror of
https://github.com/foomo/contentserver.git
synced 2025-10-16 12:25:44 +00:00
added mimetype to item
This commit is contained in:
parent
2b1ecd0cf6
commit
13420e9f0d
@ -3,10 +3,11 @@ package content
|
||||
import ()
|
||||
|
||||
type Item struct {
|
||||
Id string `json:"id"`
|
||||
Name string `json:"name"`
|
||||
URI string `json:"URI"`
|
||||
Data map[string]interface{} `json:"data"`
|
||||
Id string `json:"id"`
|
||||
Name string `json:"name"`
|
||||
URI string `json:"URI"`
|
||||
MimeType string `json:"mimeType"`
|
||||
Data map[string]interface{} `json:"data"`
|
||||
}
|
||||
|
||||
func NewItem() *Item {
|
||||
|
||||
@ -60,6 +60,7 @@ func (node *RepoNode) ToItem(dataFields []string) *Item {
|
||||
item := NewItem()
|
||||
item.Id = node.Id
|
||||
item.Name = node.Name
|
||||
item.MimeType = node.MimeType
|
||||
item.URI = node.URI
|
||||
for _, dataField := range dataFields {
|
||||
if data, ok := node.Data[dataField]; ok {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user