mirror of
https://github.com/nagisa77/OpenIsle.git
synced 2026-02-24 15:10:48 +08:00
fix: avatar 以及 auth 重构
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { toast } from '../main'
|
||||
import { setToken, loadCurrentUser } from './auth'
|
||||
import { setToken } from './auth'
|
||||
import { registerPush } from './push'
|
||||
|
||||
export function githubAuthorize(inviteToken = '') {
|
||||
@@ -45,7 +45,6 @@ export async function githubExchange(code, inviteToken = '', reason = '') {
|
||||
|
||||
if (res.ok && data.token) {
|
||||
setToken(data.token)
|
||||
await loadCurrentUser()
|
||||
toast.success('登录成功')
|
||||
registerPush?.()
|
||||
return { success: true, needReason: false }
|
||||
|
||||
Reference in New Issue
Block a user