17 lines
358 B
TypeScript
17 lines
358 B
TypeScript
|
|
import { NextResponse } from "next/server";
|
||
|
|
import { getModDetails } from "@/lib/mods";
|
||
|
|
|
||
|
|
export const dynamic = "force-dynamic";
|
||
|
|
|
||
|
|
export async function GET() {
|
||
|
|
try {
|
||
|
|
const mods = getModDetails();
|
||
|
|
return NextResponse.json(mods);
|
||
|
|
} catch (e) {
|
||
|
|
return NextResponse.json(
|
||
|
|
{ error: (e as Error).message },
|
||
|
|
{ status: 500 }
|
||
|
|
);
|
||
|
|
}
|
||
|
|
}
|