Merged in feature/SW-2320-languagebased-hide-for-next-release (pull request #1937)

Language based alternative to HIDE_FOR_NEXT_RELEASE

Approved-by: Anton Gunnarsson
This commit is contained in:
Joakim Jäderberg
2025-05-05 10:53:28 +00:00
parent 3bcf6cff4a
commit 5784822a1e
41 changed files with 232 additions and 133 deletions

View File

@@ -12,8 +12,8 @@ export async function GET(
_request: NextRequest,
context: { params: { sitemapId: string } }
) {
if (env.HIDE_FOR_NEXT_RELEASE) {
notFound()
if (env.NEW_SITE_LIVE_STATUS !== "ALL_LANGUAGES_LIVE") {
return notFound()
}
const sitemapId = context.params.sitemapId
@@ -21,12 +21,12 @@ export async function GET(
console.log("[SITEMAP] Fetching sitemap by ID", sitemapId)
if (!sitemapId) {
notFound()
return notFound()
}
const sitemapData = await getSitemapDataById(Number(sitemapId))
if (!sitemapData.length) {
notFound()
return notFound()
}
const entries = sitemapData.map((entry) => {

View File

@@ -7,8 +7,8 @@ import { getLastUpdated, getSitemapIds } from "@/utils/sitemap"
export const dynamic = "force-dynamic"
export async function GET() {
if (env.HIDE_FOR_NEXT_RELEASE) {
notFound()
if (env.NEW_SITE_LIVE_STATUS !== "ALL_LANGUAGES_LIVE") {
return notFound()
}
console.log(`[SITEMAP] Fetching sitemap`)