feat: modernized web application
This commit is contained in:
15
nextjs/src/app/api/archive/route.ts
Normal file
15
nextjs/src/app/api/archive/route.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import { NextResponse } from 'next/server';
|
||||
|
||||
import { getArchiveItems } from '@/lib/data';
|
||||
|
||||
export const dynamic = 'force-dynamic';
|
||||
|
||||
export async function GET() {
|
||||
try {
|
||||
const data = await getArchiveItems();
|
||||
return NextResponse.json(data);
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
return NextResponse.json([], { status: 500 });
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user