Skip to content

Commit

Permalink
perf(snippets): no need to fetch snippets after patch
Browse files Browse the repository at this point in the history
  • Loading branch information
antonreshetov committed Jul 7, 2022
1 parent 3a91111 commit 3a51e69
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/renderer/store/snippets.ts
Expand Up @@ -120,7 +120,6 @@ export const useSnippetStore = defineStore('snippets', {
key: keyof SnippetContent,
value: string | Language
) {
const folderStore = useFolderStore()
const body: Partial<Snippet> = {}
const content = this.selected?.content

Expand All @@ -130,7 +129,6 @@ export const useSnippetStore = defineStore('snippets', {
body.updatedAt = new Date().valueOf()

await useApi(`/snippets/${this.selectedId}`).patch(body)
await this.getSnippetsByFolderIds(folderStore.selectedIds!)
}
},
async addNewSnippet (body?: Partial<Snippet>) {
Expand Down

0 comments on commit 3a51e69

Please sign in to comment.