Skip to content
This repository was archived by the owner on Jun 28, 2025. It is now read-only.

Commit e2bb733

Browse files
author
Manuel Proß
committed
fix(web): readd heading of news section
1 parent 8576c0d commit e2bb733

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

web/src/app/api/[homepage]/route.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,13 @@ export async function GET() {
2020
}
2121

2222
const newsSections = homePageData.data.attributes.body.flatMap((contentEntry, i) => {
23-
if ("newsCount" in contentEntry) return { index: i, newsCount: contentEntry.newsCount };
23+
if ("newsCount" in contentEntry) return { index: i, newsCount: contentEntry.newsCount, headline: contentEntry.headline };
2424
else return [];
2525
});
2626

2727
for (const newsSectionEntry of newsSections) {
2828
const fetchedNews = await getNews(newsSectionEntry.newsCount);
29+
fetchedNews.headline = newsSectionEntry.headline;
2930
homePageData.data.attributes.body[newsSectionEntry.index] = fetchedNews;
3031
}
3132

0 commit comments

Comments
 (0)