16 lines
340 B
TypeScript
16 lines
340 B
TypeScript
import { NextResponse } from 'next/server';
|
|
|
|
import { getGuideItems } from '@/lib/data';
|
|
|
|
export const dynamic = 'force-dynamic';
|
|
|
|
export async function GET() {
|
|
try {
|
|
const data = await getGuideItems();
|
|
return NextResponse.json(data);
|
|
} catch (e) {
|
|
console.error(e);
|
|
return NextResponse.json([], { status: 500 });
|
|
}
|
|
}
|