MCPcopy Create free account
hub / github.com/TraderAlice/OpenAlice / save

Function save

ui/src/api/api-keys.ts:10–20  ·  view source on GitHub ↗
(keys: Record<string, string>)

Source from the content-addressed store, hash-verified

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}

Callers

nothing calls this directly

Calls 1

fetchFunction · 0.50

Tested by

no test coverage detected