feat: 推送链路调整

This commit is contained in:
Tim
2025-07-30 11:35:28 +08:00
parent dccf8f9d0c
commit aa138afe61
8 changed files with 17 additions and 2 deletions

View File

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