feat: merge conflict resolution, site management, UI fixes

This commit is contained in:
ShukeBta
2026-05-16 17:57:34 +08:00
parent 0be8c7952e
commit cbb4b806be
84 changed files with 13826 additions and 202 deletions
+27
View File
@@ -0,0 +1,27 @@
// 令牌刷新 API 模块
import { api } from './client'
// 刷新令牌请求/响应
export interface RefreshTokenRequest {
refresh_token: string
}
export interface RefreshTokenResponse {
token: string
refresh_token: string
expires_in: number
token_type: string
}
// 刷新访问令牌
export async function refreshToken(refreshToken: string): Promise<RefreshTokenResponse> {
const resp = await api.post<RefreshTokenResponse>('/auth/refresh', {
refresh_token: refreshToken,
})
return resp.data as unknown as RefreshTokenResponse
}
// 登出
export async function logout(): Promise<void> {
await api.post('/me/logout')
}