2 lines
975 B
JavaScript
2 lines
975 B
JavaScript
import{x as e,y as o}from"./index-CuOHsLf7.js";async function i(){const t=await e("/api/webui/system/restart",{method:"POST",headers:o()});if(!t.ok){const a=await t.json();throw new Error(a.detail||"重启失败")}return await t.json()}async function c(){const t=await e("/api/webui/system/status",{method:"GET",headers:o()});if(!t.ok){const a=await t.json();throw new Error(a.detail||"获取状态失败")}return await t.json()}async function w(){const t=await e("/api/webui/system/local-cache",{method:"GET",headers:o()});if(!t.ok){const a=await t.json();throw new Error(a.detail||"获取本地缓存统计失败")}return await t.json()}async function h(t,a=[]){const s=await e("/api/webui/system/local-cache/cleanup",{method:"POST",headers:{...o(),"Content-Type":"application/json"},body:JSON.stringify({target:t,tables:a})});if(!s.ok){const r=await s.json();throw new Error(r.detail||"清理本地缓存失败")}return await s.json()}export{c as a,h as c,w as g,i as r};
|