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

Function updateSection

ui/src/api/config.ts:11–22  ·  view source on GitHub ↗
(section: string, data: unknown)

Source from the content-addressed store, hash-verified

9 },
10
11 async updateSection(section: string, data: unknown): Promise<unknown> {
12 const res = await fetch(`/api/config/${section}`, {
13 method: 'PUT',
14 headers,
15 body: JSON.stringify(data),
16 })
17 if (!res.ok) {
18 const err = await res.json().catch(() => ({ error: 'Save failed' }))
19 throw new Error(err.error || 'Save failed')
20 }
21 return res.json()
22 },
23
24 // ==================== Presets ====================
25

Callers

nothing calls this directly

Calls 1

fetchFunction · 0.50

Tested by

no test coverage detected