()
| 144 | } |
| 145 | |
| 146 | async function fetchTrash() { |
| 147 | if (trashFetchPromise) return trashFetchPromise; |
| 148 | trashFetchPromise = fetch(ENDPOINTS.list, { credentials: "include" }) |
| 149 | .then(res => { |
| 150 | if (!res.ok) throw new Error(`HTTP ${res.status}`); |
| 151 | return res.json(); |
| 152 | }) |
| 153 | .finally(() => { |
| 154 | trashFetchPromise = null; |
| 155 | }); |
| 156 | return trashFetchPromise; |
| 157 | } |
| 158 | |
| 159 | function updateRowSelection(row, checked) { |
| 160 | row.classList.toggle("selected", checked); |
no outgoing calls
no test coverage detected