client: reorganize actions

This commit is contained in:
Matteo Pagliazzi
2016-12-06 17:11:40 -08:00
parent f8d4a2bd6b
commit 0b0466b960
5 changed files with 42 additions and 27 deletions

View File

@@ -43,8 +43,8 @@ let userDataWatcher = store.watch(state => [state.user, state.tasks], ([user, ta
// Load the user and the user tasks
Promise.all([
store.dispatch('fetchUser'),
store.dispatch('fetchUserTasks'),
store.dispatch('user.fetch'),
store.dispatch('tasks.fetchUserTasks'),
]).catch(() => {
alert('Impossible to fetch user. Copy into localStorage a valid habit-mobile-settings object.');
});