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 ()
|
import ()
|
||||||
|
|
||||||
type Item struct {
|
type Item struct {
|
||||||
Id string `json:"id"`
|
Id string `json:"id"`
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
URI string `json:"URI"`
|
URI string `json:"URI"`
|
||||||
Data map[string]interface{} `json:"data"`
|
MimeType string `json:"mimeType"`
|
||||||
|
Data map[string]interface{} `json:"data"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewItem() *Item {
|
func NewItem() *Item {
|
||||||
|
|||||||
@ -60,6 +60,7 @@ func (node *RepoNode) ToItem(dataFields []string) *Item {
|
|||||||
item := NewItem()
|
item := NewItem()
|
||||||
item.Id = node.Id
|
item.Id = node.Id
|
||||||
item.Name = node.Name
|
item.Name = node.Name
|
||||||
|
item.MimeType = node.MimeType
|
||||||
item.URI = node.URI
|
item.URI = node.URI
|
||||||
for _, dataField := range dataFields {
|
for _, dataField := range dataFields {
|
||||||
if data, ok := node.Data[dataField]; ok {
|
if data, ok := node.Data[dataField]; ok {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user