fix: 修正后台管理模板API路径为 /api/admin/xxx
This commit is contained in:
+3
-3
@@ -142,7 +142,7 @@
|
||||
|
||||
// 加载模型列表
|
||||
async function loadModels() {
|
||||
const res = await fetch('/api/chat/models');
|
||||
const res = await fetch('/api/admin/chat/models');
|
||||
models = await res.json();
|
||||
}
|
||||
|
||||
@@ -156,7 +156,7 @@
|
||||
|
||||
// 加载对话列表
|
||||
async function loadChats() {
|
||||
const res = await fetch('/api/chat/list');
|
||||
const res = await fetch('/api/admin/chat/list');
|
||||
chats = await res.json();
|
||||
renderChatList();
|
||||
}
|
||||
@@ -292,7 +292,7 @@
|
||||
scrollToBottom();
|
||||
|
||||
try {
|
||||
const res = await fetch('/api/chat/send', {
|
||||
const res = await fetch('/api/admin/chat/send', {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({
|
||||
|
||||
Reference in New Issue
Block a user