完善后台分页与令牌刷新

This commit is contained in:
yml
2026-05-24 17:56:26 +08:00
parent cb636e4e89
commit abc4447401
19 changed files with 392 additions and 91 deletions
+8
View File
@@ -50,3 +50,11 @@ export async function updateMe(payload: Pick<AuthUser, 'nickname' | 'avatar_url'
const { data } = await apiClient.put<ApiResponse<AuthUser>>('/me', payload)
return data.data
}
/** Manually refresh user token (for store to call on app init) */
export async function refreshUserToken(refreshToken: string) {
const { data } = await apiClient.post<ApiResponse<TokenPair>>('/auth/refresh', {
refresh_token: refreshToken,
})
return data.data
}