remaining backend interactor removals

This commit is contained in:
Henry Jameson 2026-06-15 20:02:22 +03:00
commit 0d9709825f
45 changed files with 1118 additions and 856 deletions

View file

@ -6,8 +6,10 @@ import { useCredentialsStore } from 'src/stores/credentials.js'
import {
createBookmarkFolder,
deleteBookmarkFolder,
fetchBookmarkFolders,
updateBookmarkFolder,
} from 'src/services/api/api.service.js'
import { promiseInterval } from 'src/services/promise_interval/promise_interval.js'
export const useBookmarkFoldersStore = defineStore('bookmarkFolders', {
state: () => ({
@ -24,6 +26,23 @@ export const useBookmarkFoldersStore = defineStore('bookmarkFolders', {
},
},
actions: {
startFetching() {
promiseInterval(() => {
this.fetcher = fetchBookmarkFolders({
credentials: useCredentialsStore().current,
})
.then(
(folders) => this.setBookmarkFolders(folders),
(rej) => console.error(rej),
)
.catch((e) => {
console.error(e)
})
}, 240000)
},
stopFetching() {
this.fetcher?.stop()
},
setBookmarkFolders(value) {
this.allFolders = value
},