Dockerfile打包使用pnpm
next.js打包忽略eslint和typescript报错导致打包失败的问题 ant-design引入兼容包,以兼容React19 eslint配置文件由json更换成js 反馈内容由写死的改为获取当前的conversationid会话ID,反馈的用户名称username从cookie里获取 反馈弹窗弹出时使用Promise异步等待如果没有点击确定,则不传递给dify已反馈成功请求
This commit is contained in:
@@ -1,19 +1,26 @@
|
||||
import { type NextRequest } from 'next/server'
|
||||
import { NextResponse } from 'next/server'
|
||||
import { client, getInfo } from '@/app/api/utils/common'
|
||||
import { type NextRequest } from "next/server";
|
||||
import { NextResponse } from "next/server";
|
||||
import { client, getInfo } from "@/app/api/utils/common";
|
||||
|
||||
export async function POST(request: NextRequest, { params }: {
|
||||
params: { conversationId: string }
|
||||
}) {
|
||||
const body = await request.json()
|
||||
const {
|
||||
auto_generate,
|
||||
name,
|
||||
} = body
|
||||
const { conversationId } = await params
|
||||
const { user } = getInfo(request)
|
||||
export async function POST(
|
||||
request: NextRequest,
|
||||
{
|
||||
params,
|
||||
}: {
|
||||
params: Promise<{ conversationId: string }>;
|
||||
}
|
||||
) {
|
||||
const body = await request.json();
|
||||
const { auto_generate, name } = body;
|
||||
const { conversationId } = await params;
|
||||
const { user } = getInfo(request);
|
||||
|
||||
// auto generate name
|
||||
const { data } = await client.renameConversation(conversationId, name, user, auto_generate)
|
||||
return NextResponse.json(data)
|
||||
const { data } = await client.renameConversation(
|
||||
conversationId,
|
||||
name,
|
||||
user,
|
||||
auto_generate
|
||||
);
|
||||
return NextResponse.json(data);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user