修改应用名称

This commit is contained in:
wenyongda 2025-07-24 15:39:37 +08:00
parent cf434cf930
commit e24a04098c

View File

@ -1,35 +1,34 @@
import { type NextRequest } from 'next/server' import { type NextRequest } from "next/server";
import { NextResponse } from 'next/server' import { NextResponse } from "next/server";
import { client, getInfo, setSession } from '@/app/api/utils/common' import { client, getInfo, setSession } from "@/app/api/utils/common";
export async function GET(request: NextRequest) { export async function GET(request: NextRequest) {
const { sessionId, user } = getInfo(request) const { sessionId, user } = getInfo(request);
try { try {
const { data } = await client.getInfo(user) const { data } = await client.getInfo(user);
// 接口未返回 建议从配置文件或者环境变量获取 // 接口未返回 建议从配置文件或者环境变量获取
data.app_id = 'app_id' data.app_id = "app_id";
data.site = { data.site = {
"title": "卓远智能问答", title: "ERP问答助手",
"chat_color_theme": null, chat_color_theme: null,
"chat_color_theme_inverted": false, chat_color_theme_inverted: false,
"icon_type": "image", icon_type: "image",
"icon": "48159ee8", icon: "48159ee8",
"icon_background": "#E4FBCC", icon_background: "#E4FBCC",
"icon_url": "/files/aaa.png", icon_url: "/files/aaa.png",
"description": "Zhuoyuan AI Helper", description: "Zhuoyuan AI Helper",
"copyright": null, copyright: null,
"privacy_policy": null, privacy_policy: null,
"custom_disclaimer": "", custom_disclaimer: "",
"default_language": "zh-Hans", default_language: "zh-Hans",
"prompt_public": false, prompt_public: false,
"show_workflow_steps": true, show_workflow_steps: true,
"use_icon_as_answer_icon": false use_icon_as_answer_icon: false,
} };
return NextResponse.json(data as object, { return NextResponse.json(data as object, {
headers: setSession(sessionId), headers: setSession(sessionId),
}) });
} } catch (error) {
catch (error) { return NextResponse.json([]);
return NextResponse.json([])
} }
} }