()
| 235 | |
| 236 | // Config |
| 237 | export async function getConfig() { |
| 238 | const res = await fetch(`${API_BASE}/config`, { headers: getHeaders() }); |
| 239 | if (!res.ok) throw new Error('Failed to fetch config'); |
| 240 | return res.json(); |
| 241 | } |
| 242 | |
| 243 | export async function updateConfig(config, reinitialize = false) { |
| 244 | const res = await fetch(`${API_BASE}/config`, { |
no test coverage detected