(config, reinitialize = false)
| 241 | } |
| 242 | |
| 243 | export async function updateConfig(config, reinitialize = false) { |
| 244 | const res = await fetch(`${API_BASE}/config`, { |
| 245 | method: 'PUT', |
| 246 | headers: getHeaders(), |
| 247 | body: JSON.stringify({ config, reinitialize }), |
| 248 | }); |
| 249 | const data = await res.json(); |
| 250 | if (!res.ok) throw new Error(data.error || 'Failed to update config'); |
| 251 | return data; |
| 252 | } |
no test coverage detected