fix(admin-web): always fetch all authorization records including revoked

Changed to always include revoked records in API query, filtering is done
on frontend side. This ensures all historical records are visible.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
hailin 2026-01-04 01:24:48 -08:00
parent 258aff8bf7
commit 0753f036bd
1 changed files with 3 additions and 3 deletions

View File

@ -43,14 +43,14 @@ export default function AuthorizationPage() {
const [revokeTarget, setRevokeTarget] = useState<Authorization | null>(null);
const [revokeReason, setRevokeReason] = useState('');
// 查询参数
// 查询参数 - 始终获取所有记录(包括已撤销的),前端做状态筛选
const queryParams = useMemo(() => ({
roleType: filterType || undefined,
keyword: searchKeyword || undefined,
includeRevoked: filterStatus === 'REVOKED' || filterStatus === '',
includeRevoked: true,
page,
limit,
}), [filterType, searchKeyword, filterStatus, page]);
}), [filterType, searchKeyword, page]);
// 获取授权列表
const { data, isLoading, error, refetch } = useAuthorizations(queryParams);