adds category to trail card/item/feed

This commit is contained in:
Christian Beutel
2025-08-22 17:19:12 +02:00
parent 380c1802f2
commit fdb6ef3b76
4 changed files with 57 additions and 20 deletions

View File

@@ -931,7 +931,14 @@ func listFeedHandler() func(e *core.RecordsListRequestEvent) error {
errs := e.App.ExpandRecord(item, []string{"author"}, nil)
if len(errs) > 0 {
return fmt.Errorf("failed to expand: %v", errs)
return fmt.Errorf("failed to expand author: %v", errs)
}
if typ == string(util.TrailFeed) {
errs := e.App.ExpandRecord(item, []string{"category"}, nil)
if len(errs) > 0 {
return fmt.Errorf("failed to expand category: %v", errs)
}
}
r.MergeExpand(map[string]any{"item": item})