MCPcopy Create free account
hub / github.com/0010aor/FlashNotes / deleteLocalCard

Function deleteLocalCard

frontend/src/data/localDB/cards.ts:77–86  ·  view source on GitHub ↗
(id: string)

Source from the content-addressed store, hash-verified

75}
76
77export const deleteLocalCard = async (id: string): Promise<void> => {
78 const card = await db.cards.get(id)
79 if (!card) return
80 await db.cards.delete(id)
81 await db.collections.update(card.collectionId, {
82 updatedAt: Date.now(),
83 synced: false,
84 })
85 await removeIncompletePracticeSessionsForCollection(card.collectionId)
86}
87
88export const getLocalCardsForCollections = async (
89 collectionIds: string[],

Callers

nothing calls this directly

Calls 3

deleteMethod · 0.65
updateMethod · 0.65

Tested by

no test coverage detected