Skip to content

Commit ad7f083

Browse files
authored
feat: hidden projects
1 parent c797fb0 commit ad7f083

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/app/[lang]/(StaticLayout)/projects/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ async function fetchProjects(lang: Language): Promise<Project[]> {
1919

2020
async function fetchNextProjects() {
2121
// Fetch next page
22-
const projectsRes = await fetch(`${process.env.NEXT_PUBLIC_CMS_URL!}/api/projects?limit=100&page=${page}&depth=2&locale=${lang}&fallback-locale=en`, {
22+
const projectsRes = await fetch(`${process.env.NEXT_PUBLIC_CMS_URL!}/api/projects?limit=100&page=${page}&depth=2&locale=${lang}&fallback-locale=en&where[status][not_equals]=hidden`, {
2323
headers: {
2424
'X-RateLimit-Bypass': process.env.PAYLOAD_BYPASS_RATE_LIMIT_KEY ?? undefined,
2525
Authorization: process.env.PAYLOAD_API_KEY ? `users API-Key ${process.env.PAYLOAD_API_KEY}` : undefined,

src/app/sitemap.xml/route.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export async function GET() {
99

1010
async function fetchNextProjects() {
1111
// Fetch next page
12-
const projectsRes = await fetch(`${process.env.NEXT_PUBLIC_CMS_URL!}/api/projects?depth=0&limit=100&page=${page}&depth=0`, {
12+
const projectsRes = await fetch(`${process.env.NEXT_PUBLIC_CMS_URL!}/api/projects?depth=0&limit=100&page=${page}&where[status][not_equals]=hidden`, {
1313
headers: {
1414
'X-RateLimit-Bypass': process.env.PAYLOAD_BYPASS_RATE_LIMIT_KEY ?? undefined,
1515
Authorization: process.env.PAYLOAD_API_KEY ? `users API-Key ${process.env.PAYLOAD_API_KEY}` : undefined,

0 commit comments

Comments
 (0)