Spaces:
Running
Running
File size: 530 Bytes
03e2430 2fcae3f 03e2430 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | import { NextResponse } from "next/server"
import { getDeveloperSummaryById } from "@/lib/data-backend"
export async function GET(request: Request) {
const { searchParams } = new URL(request.url)
const id = searchParams.get("id")
if (!id) {
return NextResponse.json({ error: "Missing developer id" }, { status: 400 })
}
const summary = await getDeveloperSummaryById(id)
if (!summary) {
return NextResponse.json({ error: "Developer not found" }, { status: 404 })
}
return NextResponse.json(summary)
}
|