MCPcopy Create free account
hub / github.com/TanStack/db / delete

Function delete

examples/electron/offline-first/src/utils/api.ts:52–61  ·  view source on GitHub ↗
(id: string)

Source from the content-addressed store, hash-verified

50 },
51
52 async delete(id: string): Promise<boolean> {
53 const response = await fetch(`${BASE_URL}/api/todos/${id}`, {
54 method: 'DELETE',
55 })
56 if (response.status === 404) return false
57 if (!response.ok) {
58 throw new Error(`Failed to delete todo: ${response.status}`)
59 }
60 return true
61 },
62
63 async deleteAll(): Promise<void> {
64 const response = await fetch(`${BASE_URL}/api/todos`, {

Callers

nothing calls this directly

Calls 1

fetchFunction · 0.50

Tested by

no test coverage detected