This commit is contained in:
PxlLoewe
2025-07-06 00:36:48 -07:00
parent 2cdbab9f28
commit a9d20e018d
13 changed files with 72 additions and 19 deletions

View File

@@ -0,0 +1,19 @@
import { prisma } from "@repo/db";
import { NextResponse } from "next/server";
export async function GET(request: Request): Promise<NextResponse> {
try {
const config = await prisma.config.findFirst({
orderBy: {
createdAt: "desc",
},
});
return NextResponse.json(config, {
status: 200,
});
} catch (error) {
console.error(error);
return NextResponse.json({ error: "Failed to fetch Aircrafts" }, { status: 500 });
}
}