docs
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user