MCPcopy Create free account
hub / github.com/Superflows-AI/superflows / deleteDocument

Function deleteDocument

lib/hooks/useDocumentsLoader.ts:28–39  ·  view source on GitHub ↗
(document: Document)

Source from the content-addressed store, hash-verified

26 };
27
28 const deleteDocument = async (document: Document) => {
29 const documentChunkIds = document.docChunks.map((docChunk) =>
30 docChunk.id.toString(),
31 );
32
33 const { error } = await supabase
34 .from("doc_chunks")
35 .delete()
36 .in("id", documentChunkIds);
37
38 return error;
39 };
40
41 const fetchPage = async (page: number) => {
42 const { data: documents, error } = await supabase.rpc("get_sections", {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected