(
id: string,
updates: Partial<Pick<DataSource, 'name' | 'baseUrl' | 'token' | 'intervalMinutes' | 'pullLimit' | 'enabled'>>
)
| 360 | } |
| 361 | |
| 362 | async function updateDataSource( |
| 363 | id: string, |
| 364 | updates: Partial<Pick<DataSource, 'name' | 'baseUrl' | 'token' | 'intervalMinutes' | 'pullLimit' | 'enabled'>> |
| 365 | ) { |
| 366 | try { |
| 367 | const ds = await transport.updateDataSource(id, updates) |
| 368 | if (ds) { |
| 369 | const idx = dataSources.value.findIndex((s) => s.id === id) |
| 370 | if (idx !== -1) dataSources.value[idx] = ds |
| 371 | } |
| 372 | return ds |
| 373 | } catch (err) { |
| 374 | console.error('[ApiServerStore] Failed to update data source:', err) |
| 375 | return null |
| 376 | } |
| 377 | } |
| 378 | |
| 379 | async function deleteDataSource(id: string) { |
| 380 | try { |
nothing calls this directly
no test coverage detected