basic seach small json data set models and parts

This commit is contained in:
2025-11-24 12:51:14 +00:00
parent b064d458c4
commit ffe7ea5d75
58 changed files with 3006 additions and 81 deletions
+11
View File
@@ -0,0 +1,11 @@
import { MODELS } from "@/lib/data/models";
export async function GET(request, context) {
const { id } = await context.params; // ⬅ MUST AWAIT PARAMS
const model = MODELS.find((m) => m.id === id);
if (!model) {
return Response.json({ error: "Model not found" }, { status: 404 });
}
return Response.json(model);
}