mirror of
https://github.com/langgenius/webapp-conversation.git
synced 2025-12-23 15:56:41 +08:00
fix: await params in dynamic route for Next.js 15 compatibility
This commit is contained in:
@ -3,14 +3,14 @@ import { NextResponse } from 'next/server'
|
|||||||
import { client, getInfo } from '@/app/api/utils/common'
|
import { client, getInfo } from '@/app/api/utils/common'
|
||||||
|
|
||||||
export async function POST(request: NextRequest, { params }: {
|
export async function POST(request: NextRequest, { params }: {
|
||||||
params: { conversationId: string }
|
params: Promise<{ conversationId: string }>
|
||||||
}) {
|
}) {
|
||||||
const body = await request.json()
|
const body = await request.json()
|
||||||
const {
|
const {
|
||||||
auto_generate,
|
auto_generate,
|
||||||
name,
|
name,
|
||||||
} = body
|
} = body
|
||||||
const { conversationId } = params
|
const { conversationId } = await params
|
||||||
const { user } = getInfo(request)
|
const { user } = getInfo(request)
|
||||||
|
|
||||||
// auto generate name
|
// auto generate name
|
||||||
|
|||||||
Reference in New Issue
Block a user