diff --git a/index.html b/index.html index 4af3abd..93b30b9 100644 --- a/index.html +++ b/index.html @@ -1012,7 +1012,7 @@ if($("btnBrowseFolder")){ $("btnBrowseFolder").onclick = async ()=>{ $("btnBrowseFolder").disabled = true; showToast("Opening folder chooser…", "info"); - const j = await api("/api/choose_folder"); + const j = await api("/api/choose_folder", {}); $("btnBrowseFolder").disabled = false; if(j.ok && j.folder){ $("folder").value = j.folder; @@ -1052,18 +1052,18 @@ $("btnStart").onclick = ()=>{ }); }; -$("btnPause").onclick = ()=>api("/api/pause"); -$("btnStop").onclick = ()=>api("/api/stop"); +$("btnPause").onclick = ()=>api("/api/pause", {}); +$("btnStop").onclick = ()=>api("/api/stop", {}); $("btnRetryFailed").onclick = async ()=>{ - const j = await api("/api/retry_failed"); + const j = await api("/api/retry_failed", {}); if(j.ok) addLog({level:"info",msg:"Retrying failures...",ts:new Date().toTimeString().slice(0,8)}); }; $("btnUndoAll").onclick = async ()=>{ if(confirm("☣ WARNING ☣\nThis will remove all PHOTON embedded descriptions/categories/keywords from ALL files in the scanned folder. It will also clear organized symlinks, reset the database and delete the failures log.\n\nTHIS ACTION CANNOT BE UNDONE.\n\nDo you want to proceed?")){ $("btnUndoAll").disabled = true; - const j = await api("/api/undo_all"); + const j = await api("/api/undo_all", {}); $("btnUndoAll").disabled = false; if(j.ok){ recentFiles = []; @@ -1753,7 +1753,7 @@ async function loadFailed(){ } $("btnRetryAllFailed").onclick = async ()=>{ $("btnRetryAllFailed").disabled = true; - const j = await api("/api/retry_failed"); + const j = await api("/api/retry_failed", {}); if(j.ok) addLog({level:"info", msg:"Retrying all failed photos…", ts:new Date().toTimeString().slice(0,8)}); }; @@ -1904,7 +1904,7 @@ async function loadDupeGroups(){ }); } $("btnScanDupes").onclick = async ()=>{ - const j = await api("/api/dedupe/build"); + const j = await api("/api/dedupe/build", {}); if(j.ok){ addLog({level:"info", msg:"Duplicate scan started in the background…", ts:new Date().toTimeString().slice(0,8)}); loadDupeGroups();