remaining backend interactor removals
This commit is contained in:
parent
28efd7ebd2
commit
0d9709825f
45 changed files with 1118 additions and 856 deletions
|
|
@ -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
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue