mirror of
https://github.com/foomo/contentserver.git
synced 2025-10-16 12:25:44 +00:00
feat: add groups to the content.node.item response
This commit is contained in:
parent
f3366f5211
commit
cac32f2d52
@ -8,6 +8,7 @@ type Item struct {
|
|||||||
MimeType string `json:"mimeType"`
|
MimeType string `json:"mimeType"`
|
||||||
Hidden bool `json:"hidden,omitempty"`
|
Hidden bool `json:"hidden,omitempty"`
|
||||||
Data map[string]interface{} `json:"data"`
|
Data map[string]interface{} `json:"data"`
|
||||||
|
Groups []string `json:"groups"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewItem item contructor
|
// NewItem item contructor
|
||||||
|
|||||||
@ -88,6 +88,7 @@ func (node *RepoNode) ToItem(dataFields []string) *Item {
|
|||||||
item.MimeType = node.MimeType
|
item.MimeType = node.MimeType
|
||||||
item.Hidden = node.Hidden
|
item.Hidden = node.Hidden
|
||||||
item.URI = node.URI
|
item.URI = node.URI
|
||||||
|
item.Groups = node.Groups
|
||||||
if dataFields == nil {
|
if dataFields == nil {
|
||||||
item.Data = node.Data
|
item.Data = node.Data
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user