mirror of
https://github.com/jakejarvis/sofa.git
synced 2026-08-29 03:55:38 -04:00
refactor: move system health procedure from system to admin router
- Rename `system.health` → `admin.systemHealth` and gate it behind the admin middleware - Remove `tmdbConfigured` from `system.status` response; update description to reflect its purpose - Update all call sites on web and native to use `orpc.admin.systemHealth` - Rename and relocate the docs page from `system/system.health.mdx` to `admin/admin.systemHealth.mdx`
This commit is contained in:
@@ -29,7 +29,7 @@ export function CacheSection() {
|
||||
const queryClient = useQueryClient();
|
||||
|
||||
const invalidateHealth = () =>
|
||||
queryClient.invalidateQueries({ queryKey: orpc.system.health.key() });
|
||||
queryClient.invalidateQueries({ queryKey: orpc.admin.systemHealth.key() });
|
||||
|
||||
const purgeMetadata = useMutation(
|
||||
orpc.admin.purgeMetadataCache.mutationOptions({
|
||||
|
||||
@@ -130,11 +130,11 @@ function LiveTimeAgo({
|
||||
export function SystemHealthCards() {
|
||||
const queryClient = useQueryClient();
|
||||
const { data, isPending, isFetching } = useQuery(
|
||||
orpc.system.health.queryOptions(),
|
||||
orpc.admin.systemHealth.queryOptions(),
|
||||
);
|
||||
const isRefreshing = isFetching;
|
||||
const refresh = () =>
|
||||
queryClient.invalidateQueries({ queryKey: orpc.system.health.key() });
|
||||
queryClient.invalidateQueries({ queryKey: orpc.admin.systemHealth.key() });
|
||||
|
||||
if (isPending || !data) return <SkeletonCards />;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user