0.0.1.1
This commit is contained in:
@@ -16,7 +16,6 @@ export async function GET(
|
||||
}
|
||||
|
||||
const { treeId } = await params
|
||||
console.log('API /trees/[treeId] - Requested treeId:', treeId)
|
||||
|
||||
const tree = await prisma.familyTree.findFirst({
|
||||
where: {
|
||||
@@ -50,11 +49,9 @@ export async function GET(
|
||||
})
|
||||
|
||||
if (!tree) {
|
||||
console.log('API /trees/[treeId] - Tree not found for id:', treeId)
|
||||
return NextResponse.json({ error: "家族树不存在或无权访问" }, { status: 404 })
|
||||
}
|
||||
|
||||
console.log('API /trees/[treeId] - Returning tree:', tree.name, tree.id)
|
||||
return NextResponse.json({ tree })
|
||||
} catch (error) {
|
||||
console.error("获取家族树失败:", error)
|
||||
|
||||
Reference in New Issue
Block a user