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

Function updateSnippets

src/renderer/composables/useSnippets.ts:473–482  ·  view source on GitHub ↗
(snippetIds: number[], data: SnippetsUpdate[])

Source from the content-addressed store, hash-verified

471}
472
473async function updateSnippets(snippetIds: number[], data: SnippetsUpdate[]) {
474 markPersistedStorageMutation()
475 await Promise.all(
476 snippetIds.map((snippetId, index) =>
477 api.snippets.patchSnippetsById(String(snippetId), data[index]),
478 ),
479 )
480 await getSnippets(queryByLibraryOrFolderOrSearch.value)
481 await refreshSelectedSnippet()
482}
483
484async function updateSnippetContent(
485 snippetId: number,

Callers 1

deleteSelectedSnippetsFunction · 0.85

Calls 3

refreshSelectedSnippetFunction · 0.85
getSnippetsFunction · 0.70

Tested by

no test coverage detected