semaphore/routes/_store/observers.js

11 lines
370 B
JavaScript
Raw Normal View History

2018-01-28 20:51:48 +00:00
import { updateVerifyCredentialsForInstance } from '../settings/instances/_actions/[instanceName]'
2018-02-08 17:15:25 +00:00
import { fetchLists } from '../community/_actions/community'
2018-01-28 20:51:48 +00:00
2018-01-28 21:09:39 +00:00
export function observers(store) {
2018-01-28 20:51:48 +00:00
store.observe('currentInstance', (currentInstance) => {
2018-01-28 23:44:33 +00:00
if (currentInstance) {
updateVerifyCredentialsForInstance(currentInstance)
2018-02-08 17:15:25 +00:00
fetchLists()
2018-01-28 23:44:33 +00:00
}
2018-01-28 20:51:48 +00:00
})
}