MCPcopy Create free account
hub / github.com/massCodeIO/massCode / deleteSnippets

Function deleteSnippets

src/renderer/composables/useSnippets.ts:516–524  ·  view source on GitHub ↗
(snippetIds: number[])

Source from the content-addressed store, hash-verified

514}
515
516async function deleteSnippets(snippetIds: number[]) {
517 markPersistedStorageMutation()
518 await Promise.all(
519 snippetIds.map(snippetId =>
520 api.snippets.deleteSnippetsById(String(snippetId)),
521 ),
522 )
523 await getSnippets(queryByLibraryOrFolderOrSearch.value)
524}
525
526async function deleteSelectedSnippets(fallbackSnippet?: SnippetsResponse[0]) {
527 const { confirm } = useDialog()

Callers 1

deleteSelectedSnippetsFunction · 0.85

Calls 2

getSnippetsFunction · 0.70

Tested by

no test coverage detected