Skip to content

Commit

Permalink
[-] Remove unnecessary logic
Browse files Browse the repository at this point in the history
  • Loading branch information
Muska-Ami committed Jan 13, 2025
1 parent c921fdc commit a8afef7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 16 deletions.
9 changes: 1 addition & 8 deletions src/views/auth/LoginView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -153,14 +153,7 @@ async function login(turnstileToken) {
if (rs.status === 200) {
userData.commit('set_token', rs.data.token)
userData.commit('set_user_info', rs.data)
let rsx
try {
rsx = await api.v2.user.frp.token.get(rs.data.id)
} catch (e) {
message.error('请求失败: ' + e)
}
if (!rsx) message.error('获取访问令牌时发生错误')
userData.commit('set_frp_token', rsx.data.frp_token)
userData.commit('set_frp_token', rs.data.frp_token)
notification.success('登录成功', rs.data.username + ',欢迎回来!')
router.push(redirectQuery == null ? '/dashboard' : redirect)
ldb.finish()
Expand Down
9 changes: 1 addition & 8 deletions src/views/callback/auth/oauth/qq/LoginView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,7 @@ if (code !== null) {
if (rs.status === 200) {
userData.commit('set_token', rs.data.token)
userData.commit('set_user_info', rs.data)
let rsx
try {
rsx = await api.v2.user.frp.token.get(rs.data.id)
} catch (e) {
message.error('请求失败: ' + e)
}
if (!rsx) message.error('获取访问令牌时发生错误')
userData.commit('set_frp_token', rsx.data.frp_token)
userData.commit('set_frp_token', rs.data.frp_token)
notification.success('登录成功', rs.data.username + ',欢迎回来!')
router.push(redirect || '/dashboard')
} else {
Expand Down

0 comments on commit a8afef7

Please sign in to comment.