()
| 163 | |
| 164 | // Documents |
| 165 | export async function getDocuments() { |
| 166 | const res = await fetch(`${API_BASE}/documents`, { headers: getHeaders() }); |
| 167 | if (!res.ok) throw new Error('Failed to fetch documents'); |
| 168 | return res.json(); |
| 169 | } |
| 170 | |
| 171 | export async function uploadDocuments(files, dataset) { |
| 172 | const formData = new FormData(); |
no test coverage detected