mirror of
https://github.com/nagisa77/OpenIsle.git
synced 2026-03-05 03:20:45 +08:00
feat: 推送链路调整
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { API_BASE_URL, DISCORD_CLIENT_ID, toast } from '../main'
|
||||
import { WEBSITE_BASE_URL } from '../constants'
|
||||
import { setToken, loadCurrentUser } from './auth'
|
||||
import { registerPush } from './push'
|
||||
|
||||
export function discordAuthorize(state = '') {
|
||||
if (!DISCORD_CLIENT_ID) {
|
||||
@@ -24,6 +25,7 @@ export async function discordExchange(code, state, reason) {
|
||||
setToken(data.token)
|
||||
await loadCurrentUser()
|
||||
toast.success('登录成功')
|
||||
registerPush()
|
||||
return {
|
||||
success: true,
|
||||
needReason: false
|
||||
|
||||
Reference in New Issue
Block a user