diff --git a/app/page.js b/app/page.js index ae00d64..d0d50b3 100644 --- a/app/page.js +++ b/app/page.js @@ -21,12 +21,22 @@ async function getData() { try { const titres = await client.request( readItems('titres', { + filter: { + status: { + _eq: 'published' + } + }, sort: 'numero' }) ) const articles = await client.request( readItems('articles', { + filter: { + status: { + _eq: 'published' + } + }, sort: 'numero' }) ) diff --git a/components/konstitisyon/list-comments.js b/components/konstitisyon/list-comments.js index 6d6ee2f..e0f2e00 100644 --- a/components/konstitisyon/list-comments.js +++ b/components/konstitisyon/list-comments.js @@ -34,7 +34,10 @@ export default function ListComments({session, selectedTitre, isOpen, setIsOpen, session.user.accessToken, readItems('commentaires', { filter: { - titre: selectedTitre.id + titre: selectedTitre.id, + status: { + _eq: 'published' + } }, sort: '-date_created' }))