Fix categories
This commit is contained in:
parent
e850e7f923
commit
a42aaeca32
|
|
@ -234,12 +234,11 @@ 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 {
|
if cats, ok := value.([]string); ok {
|
||||||
item.Category = value.([]string)
|
for _, v := range cats {
|
||||||
for _, v := range value.([]interface{}) {
|
|
||||||
item.Category = append(item.Category, v.(string))
|
item.Category = append(item.Category, v.(string))
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
item.Category = value.(string)
|
item.Category = append(item.Category, value.(string))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user