Optimize application flow (#196)
Co-authored-by: AceDataCloud <office@acedata.cloud>
This commit is contained in:
1 parent
a37f796c81
commit
8ad9637b86
59 files changed
+1573
-1380
No files matched your search
@@ -44,7 +44,7 @@ export const setFingerprint = ({ commit }: ActionContext<IRootState, IRootState>
|
||||
commit('setFingerprint', payload);
|
||||
};
|
||||
|
||||
export const getUser = async ({ commit }: ActionContext<IRootState, IRootState>): Promise<IUser> => {
|
||||
export const getUser = async ({ commit }: ActionContext<IRootState, IRootState>): Promise<IUser | undefined> => {
|
||||
console.debug('start to get user');
|
||||
try {
|
||||
commit('resetUser');
|
||||
@@ -54,6 +54,7 @@ export const getUser = async ({ commit }: ActionContext<IRootState, IRootState>)
|
||||
return user;
|
||||
} catch (error) {
|
||||
console.error('get user failed', error);
|
||||
return undefined;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user