Atualizar web/chat.js
This commit is contained in:
+5
-2
@@ -45,17 +45,20 @@ async function importExcel() {
|
|||||||
const form = new FormData();
|
const form = new FormData();
|
||||||
form.append("file", file);
|
form.append("file", file);
|
||||||
|
|
||||||
await fetch(`/api/import_excel/${conversationId}`, {
|
|
||||||
|
const r = await fetch(`/api/import_excel/${conversationId}`, {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
body: form
|
body: form
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const data = await r.json();
|
||||||
|
console.log("Imported sheets:", data.sheets);
|
||||||
|
|
||||||
await loadHistory();
|
await loadHistory();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
async function loadConversations() {
|
async function loadConversations() {
|
||||||
const r = await fetch("/api/conversations");
|
const r = await fetch("/api/conversations");
|
||||||
conversations = await r.json();
|
conversations = await r.json();
|
||||||
|
|||||||
Reference in New Issue
Block a user