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

Function addTagToSnippet

src/renderer/composables/useSnippets.ts:621–633  ·  view source on GitHub ↗
(tagId: number, snippetId: number)

Source from the content-addressed store, hash-verified

619}
620
621async function addTagToSnippet(tagId: number, snippetId: number) {
622 try {
623 await api.snippets.postSnippetsByIdTagsByTagId(
624 String(snippetId),
625 String(tagId),
626 )
627 await getSnippets(queryByLibraryOrFolderOrSearch.value)
628 await refreshSelectedSnippet()
629 }
630 catch (error) {
631 console.error(error)
632 }
633}
634
635async function deleteTagFromSnippet(tagId: number, snippetId: number) {
636 try {

Callers

nothing calls this directly

Calls 2

refreshSelectedSnippetFunction · 0.85
getSnippetsFunction · 0.70

Tested by

no test coverage detected