akkoma-fe/src/services/config_fetcher/config_fetcher.service.js
floatingghost 4f837f75ea
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
setting-sync (#175)
Co-authored-by: FloatingGhost <hannah@coffee-and-dreams.uk>
Reviewed-on: AkkomaGang/pleroma-fe#175
2022-10-06 15:59:16 +00:00

14 lines
356 B
JavaScript

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