(data: {
id?: string
name: string
createdAt?: string
})
| 39 | }, |
| 40 | |
| 41 | async create(data: { |
| 42 | id?: string |
| 43 | name: string |
| 44 | createdAt?: string |
| 45 | }): Promise<ApiTxResult<{ list: ShoppingList }>> { |
| 46 | const response = await offlineAwareFetch(`${API_URL}/api/lists`, { |
| 47 | method: 'POST', |
| 48 | headers: { 'Content-Type': 'application/json' }, |
| 49 | body: JSON.stringify(data), |
| 50 | }) |
| 51 | if (!response.ok) { |
| 52 | throw new Error(`Failed to create list: ${response.status}`) |
| 53 | } |
| 54 | return response.json() |
| 55 | }, |
| 56 | |
| 57 | async update( |
| 58 | id: string, |
nothing calls this directly
no outgoing calls
no test coverage detected