Client - init sports store

This commit is contained in:
Sam
2021-08-22 21:10:47 +02:00
parent cac9607489
commit a09c320093
15 changed files with 156 additions and 4 deletions

View File

@@ -3,7 +3,7 @@ import { ActionContext, ActionTree } from 'vuex'
import authApi from '@/api/authApi'
import api from '@/api/defaultApi'
import router from '@/router'
import { ROOT_STORE, USER_STORE } from '@/store/constants'
import { ROOT_STORE, SPORTS_STORE, USER_STORE } from '@/store/constants'
import { IRootState } from '@/store/modules/root/types'
import { IUserActions, IUserState } from '@/store/modules/user/types'
import { ILoginOrRegisterData } from '@/types/user'
@@ -36,6 +36,7 @@ export const actions: ActionTree<IUserState, IRootState> & IUserActions = {
USER_STORE.MUTATIONS.UPDATE_AUTH_USER_PROFILE,
res.data.data
)
context.dispatch(SPORTS_STORE.ACTIONS.GET_SPORTS)
} else {
handleError(context, null)
}