added mimetype to item

This commit is contained in:
franklin 2014-11-24 16:11:28 +01:00
parent 2b1ecd0cf6
commit 13420e9f0d
2 changed files with 6 additions and 4 deletions

View File

@ -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 {

View File

@ -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 {