This commit is contained in:
2026-09-08 23:34:42 +02:00
parent 91b61caa37
commit 754b84e5f6
18 changed files with 304 additions and 72 deletions
+2 -1
View File
@@ -3,6 +3,7 @@ import type { ArticleSummary, Paginated } from '#shared/types/blog'
export default defineEventHandler(async (event): Promise<Paginated<ArticleSummary>> => {
const query = getQuery(event)
const page = pageParam(query.page)
const locale = localeParam(query.lang)
const category = typeof query.category === 'string' ? query.category : null
const filter = category
@@ -10,7 +11,7 @@ export default defineEventHandler(async (event): Promise<Paginated<ArticleSummar
: ''
const response = await strapiFetch<StrapiList<ArticleSummary>>(
`/api/articles?${ARTICLE_SUMMARY_QUERY}&${pagination(page)}${filter}`
`/api/articles?${ARTICLE_SUMMARY_QUERY}&locale=${locale}&${pagination(page)}${filter}`
)
return {