Lone category
This commit is contained in:
parent
75c9dfd4f6
commit
e850e7f923
|
|
@ -232,10 +232,15 @@ func mapToItem(result map[string]interface{}) microsub.Item {
|
||||||
}
|
}
|
||||||
|
|
||||||
if value, e := result["category"]; e {
|
if value, e := result["category"]; e {
|
||||||
|
|
||||||
|
if cats, ok := value.([]string); ok {
|
||||||
item.Category = value.([]string)
|
item.Category = value.([]string)
|
||||||
for _, v := range value.([]interface{}) {
|
for _, v := range value.([]interface{}) {
|
||||||
item.Category = append(item.Category, v.(string))
|
item.Category = append(item.Category, v.(string))
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
item.Category = value.(string)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if published, e := result["published"]; e {
|
if published, e := result["published"]; e {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user