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

Function delete

ui/src/api/inbox.ts:86–93  ·  view source on GitHub ↗

Hard-delete an inbox entry. Returns true on success, false if * the entry didn't exist (server replied 404).

(id: string)

Source from the content-addressed store, hash-verified

84 /** Hard-delete an inbox entry. Returns true on success, false if
85 * the entry didn't exist (server replied 404). */
86 async delete(id: string): Promise<boolean> {
87 const res = await fetch(`/api/inbox/${encodeURIComponent(id)}`, {
88 method: 'DELETE',
89 })
90 if (res.status === 204) return true
91 if (res.status === 404) return false
92 throw new Error(`inbox delete failed: ${res.status}`)
93 },
94
95 async markRead(id: string): Promise<{ ok: true; id: string; readAt: number }> {
96 return fetchJson(`/api/inbox/${encodeURIComponent(id)}/read`, {

Callers

nothing calls this directly

Calls 1

fetchFunction · 0.50

Tested by

no test coverage detected