0.0.8.0
This commit is contained in:
@@ -8,8 +8,9 @@ import { RelationshipCalculator } from '@/lib/relationship-calculator'
|
||||
*/
|
||||
export async function GET(
|
||||
request: NextRequest,
|
||||
{ params }: { params: { treeId: string } }
|
||||
{ params }: { params: Promise<{ treeId: string }> }
|
||||
) {
|
||||
const { treeId } = await params
|
||||
try {
|
||||
const { searchParams } = new URL(request.url)
|
||||
const fromId = searchParams.get('from')
|
||||
@@ -24,7 +25,7 @@ export async function GET(
|
||||
|
||||
// 获取家族树的所有成员
|
||||
const members = await prisma.familyMember.findMany({
|
||||
where: { treeId: params.treeId }
|
||||
where: { treeId }
|
||||
})
|
||||
|
||||
if (members.length === 0) {
|
||||
|
||||
Reference in New Issue
Block a user