From 81e1305bffe6afa85aec35c2356d11ac2ee2b6fc Mon Sep 17 00:00:00 2001 From: Jay Date: Sun, 19 Aug 2018 21:24:19 +0800 Subject: [PATCH] fix loginUser data --- libs/route-utils/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/route-utils/index.js b/libs/route-utils/index.js index 5657aa6..158273b 100644 --- a/libs/route-utils/index.js +++ b/libs/route-utils/index.js @@ -127,7 +127,7 @@ const checkSession = async (c, n) => { if (!('session' in c) || !('user' in c.session) || !('loginType' in c.session)) throw genError('NotLogin') c.state.loginUser = { - name: c.session.loginType === 'twitch' ? c.session.user.login : c.session.user.name, + name: c.session.loginType === 'twitch' ? c.session.user.login : c.session.user.account, type: c.session.loginType }