akkoma-fe/src/services/config_fetcher/config_fetcher.service.js

15 lines
396 B
JavaScript

import { promiseInterval } from '../promise_interval/promise_interval.js'
const startFetching = ({ credentials, store }) => {
console.log('startFetching: Config')
const boundFetchAndUpdate = () => store.dispatch('getSettingsProfile')
boundFetchAndUpdate()
return promiseInterval(boundFetchAndUpdate, 10 * 60000)
}
const configFetcher = {
startFetching
}
export default configFetcher