fix loginUser data

This commit is contained in:
Jay 2018-08-19 21:24:19 +08:00
parent 473d0a63f8
commit 81e1305bff

View File

@ -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
}