debug for build
This commit is contained in:
@@ -1,14 +1,14 @@
|
||||
import { NextResponse, NextRequest } from 'next/server';
|
||||
import { cookies } from 'next/headers';
|
||||
import { generateProductsForCategory } from './data';
|
||||
import { productCategories } from '@/app/api/project_categories/data';
|
||||
import { productCategoriesData } from '../../data';
|
||||
|
||||
export async function GET(request: NextRequest, context: any) {
|
||||
const cookieStore = await cookies();
|
||||
const lang = cookieStore.get('locale')?.value || 'en';
|
||||
|
||||
const params = await context.params;
|
||||
const category = productCategories.find((cat) => cat.id === params.id);
|
||||
const category = productCategoriesData.find((cat) => cat.id === params.id);
|
||||
|
||||
if (!category) {
|
||||
return NextResponse.json({ error: 'Not found' }, { status: 404 });
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
import { NextResponse } from 'next/server';
|
||||
import { productCategoriesData } from '../product_categories/data';
|
||||
import { host } from '@/config';
|
||||
import { projects } from '../projects/data';
|
||||
|
||||
const pages = [
|
||||
'/',
|
||||
@@ -23,6 +24,7 @@ export async function GET() {
|
||||
(productCategory) => `/product-categories/${productCategory.id}`,
|
||||
),
|
||||
);
|
||||
pages.push(...projects.map((project) => `/projects/${project.id}`));
|
||||
|
||||
const urls = pages.flatMap((page) =>
|
||||
locales.map((locale) => {
|
||||
|
||||
Reference in New Issue
Block a user