add verification support
This commit is contained in:
1 parent
91a5420a76
commit
cc43fb39e8
10 files changed
+98
-29
No files matched your search
+6
-1
@@ -1,6 +1,7 @@
|
||||
import { createStore, ActionContext } from 'vuex';
|
||||
import { IUser } from '@/services/user/types';
|
||||
import { IUser, IUserDetailResponse } from '@/services/user/types';
|
||||
import createPersistedState from 'vuex-persistedstate';
|
||||
import UserService from '@/services/user/service';
|
||||
|
||||
export interface IState {
|
||||
accessToken: string | undefined;
|
||||
@@ -44,6 +45,10 @@ const store = createStore({
|
||||
},
|
||||
setUser({ commit }: ActionContext<IState, IState>, payload: IUser) {
|
||||
commit('setUser', payload);
|
||||
},
|
||||
async getMe({ commit }: ActionContext<IState, IState>) {
|
||||
const { data: data } = await UserService.getMe();
|
||||
commit('setUser', data);
|
||||
}
|
||||
},
|
||||
getters: {
|
||||
|
||||
Reference in new issue
Block a user