(keys: Record<string, string>)
| 8 | }, |
| 9 | |
| 10 | async save(keys: Record<string, string>): Promise<void> { |
| 11 | const res = await fetch('/api/config/apiKeys', { |
| 12 | method: 'PUT', |
| 13 | headers, |
| 14 | body: JSON.stringify(keys), |
| 15 | }) |
| 16 | if (!res.ok) { |
| 17 | const err = await res.json().catch(() => ({ error: 'Save failed' })) |
| 18 | throw new Error(err.error || 'Save failed') |
| 19 | } |
| 20 | }, |
| 21 | } |