Skip to content

Commit

Permalink
feat(snippets): add delete method
Browse files Browse the repository at this point in the history
  • Loading branch information
antonreshetov committed Apr 2, 2022
1 parent 90590aa commit caad594
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/renderer/store/snippets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,9 @@ export const useSnippetStore = defineStore('snippets', {
await this.patchSnippetsById(this.selectedId!, body)
await this.getSnippetsById(this.selectedId!)
},
async deleteSnippetsById (id: string) {
await useApi(`/snippets/${id}`).delete()
},
async setSnippetsByFolderIds (setFirst?: boolean) {
const folderStore = useFolderStore()
await this.getSnippetsByFolderIds(folderStore.selectedIds!)
Expand Down

0 comments on commit caad594

Please sign in to comment.