refactor: remove unused netler API and program-netleri component
- Deleted the netler API route and the associated program-netleri component as they are no longer needed in the application. This cleanup helps streamline the codebase and improve maintainability.
This commit is contained in:
@@ -1,19 +0,0 @@
|
||||
import { NextResponse, type NextRequest } from "next/server";
|
||||
import { netlerGetir } from "@/lib/db";
|
||||
|
||||
// Program satırındaki "netler" butonunun verisi: programa yerleşen son
|
||||
// kişinin yıl bazlı netleri (bkz. components/program-netleri.tsx). Veri
|
||||
// yılda bir değiştiği için istemci tarafında gönül rahatlığıyla cache'lenir.
|
||||
export function GET(request: NextRequest) {
|
||||
const id = request.nextUrl.searchParams.get("id") ?? "";
|
||||
if (!/^\d{1,12}$/.test(id)) {
|
||||
return NextResponse.json(
|
||||
{ error: "Geçerli bir program kimliği gerekli." },
|
||||
{ status: 400 },
|
||||
);
|
||||
}
|
||||
return NextResponse.json(
|
||||
{ netler: netlerGetir(id) },
|
||||
{ headers: { "Cache-Control": "public, max-age=86400" } },
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user