修改应用名称
This commit is contained in:
parent
cf434cf930
commit
e24a04098c
@ -1,35 +1,34 @@
|
||||
import { type NextRequest } from 'next/server'
|
||||
import { NextResponse } from 'next/server'
|
||||
import { client, getInfo, setSession } from '@/app/api/utils/common'
|
||||
import { type NextRequest } from "next/server";
|
||||
import { NextResponse } from "next/server";
|
||||
import { client, getInfo, setSession } from "@/app/api/utils/common";
|
||||
|
||||
export async function GET(request: NextRequest) {
|
||||
const { sessionId, user } = getInfo(request)
|
||||
const { sessionId, user } = getInfo(request);
|
||||
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 = {
|
||||
"title": "卓远智能问答",
|
||||
"chat_color_theme": null,
|
||||
"chat_color_theme_inverted": false,
|
||||
"icon_type": "image",
|
||||
"icon": "48159ee8",
|
||||
"icon_background": "#E4FBCC",
|
||||
"icon_url": "/files/aaa.png",
|
||||
"description": "Zhuoyuan AI Helper",
|
||||
"copyright": null,
|
||||
"privacy_policy": null,
|
||||
"custom_disclaimer": "",
|
||||
"default_language": "zh-Hans",
|
||||
"prompt_public": false,
|
||||
"show_workflow_steps": true,
|
||||
"use_icon_as_answer_icon": false
|
||||
}
|
||||
title: "ERP问答助手",
|
||||
chat_color_theme: null,
|
||||
chat_color_theme_inverted: false,
|
||||
icon_type: "image",
|
||||
icon: "48159ee8",
|
||||
icon_background: "#E4FBCC",
|
||||
icon_url: "/files/aaa.png",
|
||||
description: "Zhuoyuan AI Helper",
|
||||
copyright: null,
|
||||
privacy_policy: null,
|
||||
custom_disclaimer: "",
|
||||
default_language: "zh-Hans",
|
||||
prompt_public: false,
|
||||
show_workflow_steps: true,
|
||||
use_icon_as_answer_icon: false,
|
||||
};
|
||||
return NextResponse.json(data as object, {
|
||||
headers: setSession(sessionId),
|
||||
})
|
||||
}
|
||||
catch (error) {
|
||||
return NextResponse.json([])
|
||||
});
|
||||
} catch (error) {
|
||||
return NextResponse.json([]);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user