This commit is contained in:
2025-06-25 11:33:35 +08:00
parent 8a4ccd5ef2
commit 794b4c5e72
34 changed files with 2918 additions and 413 deletions
+4 -4
View File
@@ -90,7 +90,7 @@ export async function GET(
export async function DELETE(
request: NextRequest,
{ params }: { params: { id: string } }
{ params }: { params: Promise<{ id: string }> }
) {
try {
// 验证用户身份
@@ -103,7 +103,7 @@ export async function DELETE(
}
const client = new AIClient()
const success = await client.deleteConversation(params.id, user.id)
const success = await client.deleteConversation((await params).id, user.id)
if (!success) {
return NextResponse.json(
@@ -125,7 +125,7 @@ export async function DELETE(
export async function PATCH(
request: NextRequest,
{ params }: { params: { id: string } }
{ params }: { params: Promise<{ id: string }> }
) {
try {
// 验证用户身份
@@ -146,7 +146,7 @@ export async function PATCH(
}
const client = new AIClient()
const success = await client.updateConversationTitle(params.id, user.id, title)
const success = await client.updateConversationTitle((await params).id, user.id, title)
if (!success) {
return NextResponse.json(