commit remaining frontend updates

This commit is contained in:
lizhilun
2026-07-01 16:15:23 +08:00
parent e69930799c
commit 77cd66a854
6 changed files with 82 additions and 10 deletions
+3 -3
View File
@@ -11,7 +11,7 @@ async function doExport(format) {
closeExportModal();
showToast('正在导出...');
try {
const res = await fetch(API + '/api/export?format=' + format, { headers: headers() });
const res = await apiFetch(API + '/api/export?format=' + format);
if (!res.ok) {
const err = await res.json();
showToast(err.error || '导出失败');
@@ -88,9 +88,9 @@ async function confirmImport() {
if (!pendingImportContent) return;
showToast('正在导入...');
try {
const res = await fetch(API + '/api/import', {
const res = await apiFetch(API + '/api/import', {
method: 'POST',
headers: { 'Content-Type': 'text/plain; charset=utf-8', 'Authorization': 'Bearer ' + token },
headers: { 'Content-Type': 'text/plain; charset=utf-8' },
body: pendingImportContent
});
const data = await res.json();